From 873749f2189ecf1fbfdc681df4dd304a17716279 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 6 Sep 2006 12:28:01 +0000 Subject: r18168: Use {NULL} rather than POPT_TABLEEND, which is not always available. (This used to be commit 8b622c5ded0732df0eaf9f6226f52a27b6eacd73) --- source4/client/cifsdd.c | 4 ++-- source4/client/client.c | 2 +- source4/include/core.h | 5 ----- source4/lib/cmdline/popt_common.c | 6 +++--- source4/lib/cmdline/popt_common.h | 4 ---- source4/lib/cmdline/popt_credentials.c | 2 +- source4/lib/ldb/tools/cmdline.c | 2 +- source4/lib/registry/tools/regdiff.c | 2 +- source4/lib/registry/tools/regpatch.c | 2 +- source4/lib/registry/tools/regshell.c | 2 +- source4/lib/registry/tools/regtree.c | 2 +- source4/smbd/server.c | 2 +- source4/torture/smbiconv.c | 2 +- source4/torture/smbtorture.c | 2 +- source4/utils/ndrdump.c | 2 +- source4/utils/net/net.c | 2 +- source4/utils/ntlm_auth.c | 2 +- source4/utils/testparm.c | 2 +- 18 files changed, 19 insertions(+), 28 deletions(-) diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c index c7e054c364..eda25f904d 100644 --- a/source4/client/cifsdd.c +++ b/source4/client/cifsdd.c @@ -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. */ diff --git a/source4/client/client.c b/source4/client/client.c index 21c5f6ce61..e748edd347 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -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"); diff --git a/source4/include/core.h b/source4/include/core.h index f334c3df42..f99e34948b 100644 --- a/source4/include/core.h +++ b/source4/include/core.h @@ -26,11 +26,6 @@ #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; diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c index 2d12e29b85..1457873399 100644 --- a/source4/lib/cmdline/popt_common.c +++ b/source4/lib/cmdline/popt_common.c @@ -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 } }; diff --git a/source4/lib/cmdline/popt_common.h b/source4/lib/cmdline/popt_common.h index a2eaebbbea..506bf1115c 100644 --- a/source4/lib/cmdline/popt_common.h +++ b/source4/lib/cmdline/popt_common.h @@ -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 }, diff --git a/source4/lib/cmdline/popt_credentials.c b/source4/lib/cmdline/popt_credentials.c index 072ac418ae..5e9b6e97a5 100644 --- a/source4/lib/cmdline/popt_credentials.c +++ b/source4/lib/cmdline/popt_credentials.c @@ -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 } }; diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index de24475f6e..77cdcf4db8 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -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(); diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index c7e6f87792..dbbe555ad6 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -43,7 +43,7 @@ int main(int argc, char **argv) POPT_COMMON_SAMBA POPT_COMMON_CREDENTIALS POPT_COMMON_VERSION - POPT_TABLEEND + { NULL } }; registry_init(); diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c index 6e584e90a8..7ed246566c 100644 --- a/source4/lib/registry/tools/regpatch.c +++ b/source4/lib/registry/tools/regpatch.c @@ -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); diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index 5aa16d2e98..0bc1cfe324 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -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); diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c index c239a11ed4..31f5a89a1b 100644 --- a/source4/lib/registry/tools/regtree.c +++ b/source4/lib/registry/tools/regtree.c @@ -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); diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 62e55360fe..cb9ae51f08 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -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); diff --git a/source4/torture/smbiconv.c b/source4/torture/smbiconv.c index 0cd16278ee..02f053395d 100644 --- a/source4/torture/smbiconv.c +++ b/source4/torture/smbiconv.c @@ -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); diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index d66e11b01b..b924b37c23 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -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 diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c index 86a32e9d5b..0261a1c6df 100644 --- a/source4/utils/ndrdump.c +++ b/source4/utils/ndrdump.c @@ -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(); diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c index f2223a03a3..70c1de922d 100644 --- a/source4/utils/net/net.c +++ b/source4/utils/net/net.c @@ -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 diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index 1b25c96ab2..1961daeb10 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -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 */ diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c index fece3466ff..456baee301 100644 --- a/source4/utils/testparm.c +++ b/source4/utils/testparm.c @@ -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); -- cgit