s4:torture: Use C99 initializers for dirs in oplock test
authorAndreas Schneider <asn@samba.org>
Thu, 13 Dec 2018 11:53:39 +0000 (12:53 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:24 +0000 (10:29 +0100)
Yes, this was already valid C99 but the compiler on Ubuntu 14.04 simply
sucks. This doesn't happen with this gcc version on other Linux systems.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/torture/raw/oplock.c

index 0c081392ba62572542f40ed5f252feac397c33f9..1a2f564dd6cfe4976f8e4d0ff3bddb2669fb6a68 100644 (file)
@@ -4550,14 +4550,26 @@ static struct hold_oplock_info {
        uint32_t share_access;
        uint16_t fnum;
 } hold_info[] = {
-       { BASEDIR "\\notshared_close", true,  
-         NTCREATEX_SHARE_ACCESS_NONE, },
-       { BASEDIR "\\notshared_noclose", false, 
-         NTCREATEX_SHARE_ACCESS_NONE, },
-       { BASEDIR "\\shared_close", true,  
-         NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE|NTCREATEX_SHARE_ACCESS_DELETE, },
-       { BASEDIR "\\shared_noclose", false,  
-         NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE|NTCREATEX_SHARE_ACCESS_DELETE, },
+       {
+               .fname          = BASEDIR "\\notshared_close",
+               .close_on_break = true,
+               .share_access   = NTCREATEX_SHARE_ACCESS_NONE,
+       },
+       {
+               .fname          = BASEDIR "\\notshared_noclose",
+               .close_on_break = false,
+               .share_access   = NTCREATEX_SHARE_ACCESS_NONE,
+       },
+       {
+               .fname          = BASEDIR "\\shared_close",
+               .close_on_break = true,
+               .share_access   = NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE|NTCREATEX_SHARE_ACCESS_DELETE,
+       },
+       {
+               .fname          = BASEDIR "\\shared_noclose",
+               .close_on_break = false,
+               .share_access   = NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_WRITE|NTCREATEX_SHARE_ACCESS_DELETE,
+       },
 };
 
 static bool oplock_handler_hold(struct smbcli_transport *transport,