changeset 33835:8d3d721a0532

cache2: merge struct declaration and member assignment struct sigaction is not guaranteed to contain a struct or union, so do not initialize it with a double set of {} to avoid warnings as was done in a previous commit. Merging declaration and assignment also silences the warning without the risk of breaking on some systems.
author diego
date Mon, 25 Jul 2011 23:16:28 +0000
parents 495340edba54
children 99982afd6dc5
files stream/cache2.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/cache2.c	Mon Jul 25 23:16:26 2011 +0000
+++ b/stream/cache2.c	Mon Jul 25 23:16:28 2011 +0000
@@ -384,8 +384,7 @@
 static void cache_mainloop(cache_vars_t *s) {
     int sleep_count = 0;
 #if FORKED_CACHE
-    struct sigaction sa = { { 0 } };
-    sa.sa_handler = SIG_IGN;
+    struct sigaction sa = { .sa_handler = SIG_IGN };
     sigaction(SIGUSR1, &sa, NULL);
 #endif
     do {