lib:util: Use C99 initializer in tfork test
authorAndreas Schneider <asn@samba.org>
Mon, 7 Jan 2019 16:33:57 +0000 (17:33 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:22 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/util/tests/tfork.c

index a74f7e8d7e2de853415965f3561d5a9213506774..ef3a6f717d0a1a38af19698ccdaef90104cc4ea0 100644 (file)
@@ -557,11 +557,21 @@ static bool test_tfork_event_file_handle(struct torture_context *tctx)
 
        struct tfork *t1 = NULL;
        pid_t child1;
-       struct pollfd poll1[] = { {-1, POLLIN} };
+       struct pollfd poll1[] = {
+               {
+                       .fd = -1,
+                       .events = POLLIN,
+               },
+       };
 
        struct tfork *t2 = NULL;
        pid_t child2;
-       struct pollfd poll2[] = { {-1, POLLIN} };
+       struct pollfd poll2[] = {
+               {
+                       .fd = -1,
+                       .events = POLLIN,
+               },
+       };
 
 
        t1 = tfork_create();