From: Andreas Schneider Date: Mon, 14 Jan 2019 09:50:33 +0000 (+0100) Subject: s3:utils: Use C99 initializer in functable in net_lookup X-Git-Tag: ldb-1.6.1~336 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eab064aa4679b3ee5020977cef459d5883aea97;p=thirdparty%2Fsamba.git s3:utils: Use C99 initializer in functable in net_lookup Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index fb9c31c4198..777ac38dee9 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -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) {