r18168: Use {NULL} rather than POPT_TABLEEND, which is not always available.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 6 Sep 2006 12:28:01 +0000 (12:28 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:17:45 +0000 (14:17 -0500)
(This used to be commit 8b622c5ded0732df0eaf9f6226f52a27b6eacd73)

18 files changed:
source4/client/cifsdd.c
source4/client/client.c
source4/include/core.h
source4/lib/cmdline/popt_common.c
source4/lib/cmdline/popt_common.h
source4/lib/cmdline/popt_credentials.c
source4/lib/ldb/tools/cmdline.c
source4/lib/registry/tools/regdiff.c
source4/lib/registry/tools/regpatch.c
source4/lib/registry/tools/regshell.c
source4/lib/registry/tools/regtree.c
source4/smbd/server.c
source4/torture/smbiconv.c
source4/torture/smbtorture.c
source4/utils/ndrdump.c
source4/utils/net/net.c
source4/utils/ntlm_auth.c
source4/utils/testparm.c

index c7e054c3649c45dd50cba775de246928bff34eb1..eda25f904d6ab6df7515f044e4a960b5cdf9a430 100644 (file)
@@ -516,7 +516,7 @@ struct poptOption cifsddHelpOptions[] = {
   { NULL, '\0', POPT_ARG_CALLBACK, (void *)&cifsdd_help_message, '\0', NULL, NULL },
   { "help", '?', 0, NULL, '?', "Show this help message", NULL },
   { "usage", '\0', 0, NULL, 'u', "Display brief usage message", NULL },
-    POPT_TABLEEND
+  { NULL }
 } ;
 
 int main(int argc, const char ** argv)
@@ -533,7 +533,7 @@ int main(int argc, const char ** argv)
                POPT_COMMON_CONNECTION
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
        /* Block sizes. */
index 21c5f6ce61566ee1add39a72d4dae92a6d0d5150..e748edd347652d8be230e9b85fe5c9b92ae62287 100644 (file)
@@ -3090,7 +3090,7 @@ static int do_message_op(const char *desthost, const char *destip, int name_type
                POPT_COMMON_CONNECTION
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
        
        mem_ctx = talloc_init("client.c/main");
index f334c3df42f39090707e220944dbae699db95076..f99e34948b8141021a3d94b5603248556cae05c7 100644 (file)
 
 #include "libcli/util/nt_status.h"
 
-typedef bool BOOL;
-
-#define False false
-#define True true
-
 /* used to hold an arbitrary blob of data */
 typedef struct datablob {
        uint8_t *data;
index 2d12e29b85d7dffb03d76eec41bd2df3c1a08d8a..1457873399d8b2033e3532eef2cb357673f4f2a1 100644 (file)
@@ -151,7 +151,7 @@ struct poptOption popt_common_connection[] = {
        { "workgroup", 'W', POPT_ARG_STRING, NULL, 'W', "Set the workgroup name", "WORKGROUP" },
        { "scope", 'i', POPT_ARG_STRING, NULL, 'i', "Use this Netbios scope", "SCOPE" },
        { "maxprotocol", 'm', POPT_ARG_STRING, NULL, 'm', "Set max protocol level", "MAXPROTOCOL" },
-       POPT_TABLEEND
+       { NULL }
 };
 
 struct poptOption popt_common_samba[] = {
@@ -163,12 +163,12 @@ struct poptOption popt_common_samba[] = {
        { "log-basename", 'l', POPT_ARG_STRING, NULL, 'l', "Basename for log/debug files", "LOGFILEBASE" },
        { "leak-report",     0, POPT_ARG_NONE, NULL, OPT_LEAK_REPORT, "enable talloc leak reporting on exit", NULL },   
        { "leak-report-full",0, POPT_ARG_NONE, NULL, OPT_LEAK_REPORT_FULL, "enable full talloc leak reporting on exit", NULL },
-       POPT_TABLEEND
+       { NULL }
 };
 
 struct poptOption popt_common_version[] = {
        { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback },
        { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" },
-       POPT_TABLEEND
+       { NULL }
 };
 
index a2eaebbbeaa71dc3f6a1174d6300542bd64cf4ac..506bf1115ce526235888473af5e23687907ccdd3 100644 (file)
@@ -29,10 +29,6 @@ extern struct poptOption popt_common_connection[];
 extern struct poptOption popt_common_version[];
 extern struct poptOption popt_common_credentials[];
 
-#ifndef POPT_TABLEEND
-#define POPT_TABLEEND { NULL, '\0', 0, 0, 0, NULL, NULL }
-#endif
-
 #define POPT_COMMON_SAMBA { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_samba, 0, "Common samba options:", NULL },
 #define POPT_COMMON_CONNECTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_connection, 0, "Connection options:", NULL },
 #define POPT_COMMON_VERSION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version, 0, "Common samba options:", NULL },
index 072ac418ae53680666f47a5514bb5267b5d1d4fc..5e9b6e97a507404a38240e49af1aff2318c8e1b7 100644 (file)
@@ -145,5 +145,5 @@ struct poptOption popt_common_credentials[] = {
        { "simple-bind-dn", 0, POPT_ARG_STRING, NULL, OPT_SIMPLE_BIND_DN, "DN to use for a simple bind" },
        { "kerberos", 'k', POPT_ARG_STRING, NULL, OPT_KERBEROS, "Use Kerberos" },
        { "use-security-mechanisms", 0, POPT_ARG_STRING, NULL, OPT_GENSEC_MECHS, "Restricted list of authentication mechanisms available for use with this authentication"},
-       POPT_TABLEEND
+       { NULL }
 };
index de24475f6e21d89079c19eb90482e40f9baa7250..77cdcf4db88afc6d0e952384fe72e62b9051c5ca 100644 (file)
@@ -75,7 +75,7 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
 #endif
-               POPT_TABLEEND
+               { NULL }
        };
 
        ldb_global_init();
index c7e6f8779221f361f17b3e5040e4c55732fa8fa9..dbbe555ad69ae60d82c5315cf3fa7a72b3ebb014 100644 (file)
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
                POPT_COMMON_SAMBA
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
        registry_init();
index 6e584e90a816bde4ec45b42cc96a9b44e025b193..7ed246566cb4418201d2747724079fbba4028f22 100644 (file)
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
                {"remote", 'R', POPT_ARG_STRING, &remote, 0, "connect to specified remote server", NULL},
                POPT_COMMON_SAMBA
                POPT_COMMON_CREDENTIALS
-               POPT_TABLEEND
+               { NULL }
        };
 
        pc = poptGetContext(argv[0], argc, (const char **) argv, long_options,0);
index 5aa16d2e9842dc05ac5562089b77c5ebeedaa4fe..0bc1cfe3242b0d5f852546f259d8ae78eae76ee0 100644 (file)
@@ -419,7 +419,7 @@ static char **reg_completion(const char *text, int start, int end)
                POPT_COMMON_SAMBA
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
        pc = poptGetContext(argv[0], argc, (const char **) argv, long_options,0);
index c239a11ed437e636937a764d00d0e7a7fb1e1f1e..31f5a89a1b64c16c0d86b6f6ce3b45de16c40132 100644 (file)
@@ -96,7 +96,7 @@ int main(int argc, char **argv)
                {"no-values", 'V', POPT_ARG_NONE, &no_values, 0, "don't show values", NULL},
                POPT_COMMON_SAMBA       
                POPT_COMMON_CREDENTIALS 
-               POPT_TABLEEND
+               { NULL }
        };
 
        pc = poptGetContext(argv[0], argc, (const char **) argv, long_options,0);
index 62e55360fe7d29ad461726eff38576a10a76ab2b..cb9ae51f083b423f88c4b41337fd6a9e8924d307 100644 (file)
@@ -185,7 +185,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
                 "set maximum runtime of the server process, till autotermination", "seconds"},
                POPT_COMMON_SAMBA
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
        pc = poptGetContext(binary_name, argc, argv, long_options, 0);
index 0cd16278eeeb99105468291bed644a98cefed66b..02f053395d67514d370ee1515d414ef69803f6ba 100644 (file)
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
                { "to-code", 't', POPT_ARG_STRING, &to, 0, "Encoding for output" },
                { "output", 'o', POPT_ARG_STRING, &output, 0, "Write output to this file" },
                { "preload-modules", 'p', POPT_ARG_STRING, &preload_modules[0], 0, "Modules to load" },
-               POPT_TABLEEND
+               { NULL }
        };
 
        setlinebuf(stdout);
index d66e11b01be7d8450f79fcbbd942b351f1b26970..b924b37c23cf674e988b624b916375a21d1a5d35 100644 (file)
@@ -410,7 +410,7 @@ const static struct torture_ui_ops quiet_ui_ops = {
                POPT_COMMON_CONNECTION
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
 #ifdef HAVE_SETBUFFER
index 86a32e9d5b11600d30f194b76fc62b0710ac511f..0261a1c6dfdbd4c921fd91a8e6bb9af228bd77ad 100644 (file)
@@ -153,7 +153,7 @@ const struct dcerpc_interface_table *load_iface_from_plugin(const char *plugin,
                {"load-dso", 'l', POPT_ARG_STRING, &plugin, 0, "load from shared object file", NULL },
                POPT_COMMON_SAMBA
                POPT_AUTOHELP
-               POPT_TABLEEND
+               { NULL }
        };
 
        dcerpc_table_init();
index f2223a03a33c544144539e7b62bccf62e77764b1..70c1de922d1c0e1d1d50c39370c463f63428c33c 100644 (file)
@@ -148,7 +148,7 @@ static int binary_net(int argc, const char **argv)
                POPT_COMMON_CONNECTION
                POPT_COMMON_CREDENTIALS
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
 #ifdef HAVE_SETBUFFER
index 1b25c96ab27d2441a4ec7e8bc672b39cbc5c1eea..1961daeb101dccef6032d9feee46bb64f320f73f 100644 (file)
@@ -1005,7 +1005,7 @@ int main(int argc, const char **argv)
                { "multiplex", 0, POPT_ARG_NONE, &opt_multiplex, OPT_MULTIPLEX, "Multiplex Mode"},
                POPT_COMMON_SAMBA
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
        /* Samba client initialisation */
index fece3466ffbdfcc719286c1fd640242f2e956f49..456baee301d634e6ab27ee934bc98b57be18b890 100644 (file)
@@ -106,7 +106,7 @@ static int do_global_checks(void)
                {"client-ip", '\0', POPT_ARG_STRING, &caddr, 0, "Client IP address for 'hosts allow' checking"},
                POPT_COMMON_SAMBA
                POPT_COMMON_VERSION
-               POPT_TABLEEND
+               { NULL }
        };
 
        setup_logging(NULL, DEBUG_STDERR);