s3:utils: Use C99 initializer in functable in net_lookup
authorAndreas Schneider <asn@samba.org>
Mon, 14 Jan 2019 09:50:33 +0000 (10:50 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:23 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/utils/net_lookup.c

index fb9c31c41989ee6ff3c94aa8c38b10dc6747364a..777ac38dee9ab2a53851412e3df960b269a3227c 100644 (file)
@@ -453,16 +453,45 @@ int net_lookup(struct net_context *c, int argc, const char **argv)
        int i;
 
        struct functable table[] = {
-               {"HOST", net_lookup_host},
-               {"LDAP", net_lookup_ldap},
-               {"DC", net_lookup_dc},
-               {"PDC", net_lookup_pdc},
-               {"MASTER", net_lookup_master},
-               {"KDC", net_lookup_kdc},
-               {"NAME", net_lookup_name},
-               {"SID", net_lookup_sid},
-               {"DSGETDCNAME", net_lookup_dsgetdcname},
-               {NULL, NULL}
+               {
+                       .funcname = "HOST",
+                       .fn       = net_lookup_host,
+               },
+               {
+                       .funcname = "LDAP",
+                       .fn       = net_lookup_ldap,
+               },
+               {
+                       .funcname = "DC",
+                       .fn       = net_lookup_dc,
+               },
+               {
+                       .funcname = "PDC",
+                       .fn       = net_lookup_pdc,
+               },
+               {
+                       .funcname = "MASTER",
+                       .fn       = net_lookup_master,
+               },
+               {
+                       .funcname = "KDC",
+                       .fn       = net_lookup_kdc,
+               },
+               {
+                       .funcname = "NAME",
+                       .fn       = net_lookup_name,
+               },
+               {
+                       .funcname = "SID",
+                       .fn       = net_lookup_sid,
+               },
+               {
+                       .funcname = "DSGETDCNAME",
+                       .fn       = net_lookup_dsgetdcname,
+               },
+               {
+                       .funcname = NULL,
+               },
        };
 
        if (argc < 1) {