svn commit: samba r18168 - in branches/SAMBA_4_0/source: client include lib/cmdline lib/ldb/tools lib/registry/tools smbd torture utils utils/net

jelmer at samba.org jelmer at samba.org
Wed Sep 6 12:28:02 GMT 2006


Author: jelmer
Date: 2006-09-06 12:28:01 +0000 (Wed, 06 Sep 2006)
New Revision: 18168

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18168

Log:
Use {NULL} rather than POPT_TABLEEND, which is not always available.

Modified:
   branches/SAMBA_4_0/source/client/cifsdd.c
   branches/SAMBA_4_0/source/client/client.c
   branches/SAMBA_4_0/source/include/core.h
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.h
   branches/SAMBA_4_0/source/lib/cmdline/popt_credentials.c
   branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
   branches/SAMBA_4_0/source/lib/registry/tools/regdiff.c
   branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c
   branches/SAMBA_4_0/source/lib/registry/tools/regshell.c
   branches/SAMBA_4_0/source/lib/registry/tools/regtree.c
   branches/SAMBA_4_0/source/smbd/server.c
   branches/SAMBA_4_0/source/torture/smbiconv.c
   branches/SAMBA_4_0/source/torture/smbtorture.c
   branches/SAMBA_4_0/source/utils/ndrdump.c
   branches/SAMBA_4_0/source/utils/net/net.c
   branches/SAMBA_4_0/source/utils/ntlm_auth.c
   branches/SAMBA_4_0/source/utils/testparm.c


Changeset:
Modified: branches/SAMBA_4_0/source/client/cifsdd.c
===================================================================
--- branches/SAMBA_4_0/source/client/cifsdd.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/client/cifsdd.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -516,7 +516,7 @@
   { 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 @@
 		POPT_COMMON_CONNECTION
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 	/* Block sizes. */

Modified: branches/SAMBA_4_0/source/client/client.c
===================================================================
--- branches/SAMBA_4_0/source/client/client.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/client/client.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -3090,7 +3090,7 @@
 		POPT_COMMON_CONNECTION
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 	
 	mem_ctx = talloc_init("client.c/main");

Modified: branches/SAMBA_4_0/source/include/core.h
===================================================================
--- branches/SAMBA_4_0/source/include/core.h	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/include/core.h	2006-09-06 12:28:01 UTC (rev 18168)
@@ -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;

Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -151,7 +151,7 @@
 	{ "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 @@
 	{ "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 }
 };
 

Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.h
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.h	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.h	2006-09-06 12:28:01 UTC (rev 18168)
@@ -29,10 +29,6 @@
 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 },

Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_credentials.c
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_credentials.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_credentials.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -145,5 +145,5 @@
 	{ "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 }
 };

Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -75,7 +75,7 @@
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
 #endif
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 	ldb_global_init();

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regdiff.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regdiff.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regdiff.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -43,7 +43,7 @@
 		POPT_COMMON_SAMBA
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 	registry_init();

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -39,7 +39,7 @@
 		{"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);

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regshell.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -419,7 +419,7 @@
 		POPT_COMMON_SAMBA
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 	pc = poptGetContext(argv[0], argc, (const char **) argv, long_options,0);

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regtree.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/tools/regtree.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regtree.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -96,7 +96,7 @@
 		{"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);

Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/smbd/server.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -185,7 +185,7 @@
 		 "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);

Modified: branches/SAMBA_4_0/source/torture/smbiconv.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbiconv.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/torture/smbiconv.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -183,7 +183,7 @@
 		{ "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);

Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -410,7 +410,7 @@
 		POPT_COMMON_CONNECTION
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 #ifdef HAVE_SETBUFFER

Modified: branches/SAMBA_4_0/source/utils/ndrdump.c
===================================================================
--- branches/SAMBA_4_0/source/utils/ndrdump.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/utils/ndrdump.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -153,7 +153,7 @@
 		{"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();

Modified: branches/SAMBA_4_0/source/utils/net/net.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/utils/net/net.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -148,7 +148,7 @@
 		POPT_COMMON_CONNECTION
 		POPT_COMMON_CREDENTIALS
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 #ifdef HAVE_SETBUFFER

Modified: branches/SAMBA_4_0/source/utils/ntlm_auth.c
===================================================================
--- branches/SAMBA_4_0/source/utils/ntlm_auth.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/utils/ntlm_auth.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -1005,7 +1005,7 @@
 		{ "multiplex", 0, POPT_ARG_NONE, &opt_multiplex, OPT_MULTIPLEX, "Multiplex Mode"},
 		POPT_COMMON_SAMBA
 		POPT_COMMON_VERSION
-		POPT_TABLEEND
+		{ NULL }
 	};
 
 	/* Samba client initialisation */

Modified: branches/SAMBA_4_0/source/utils/testparm.c
===================================================================
--- branches/SAMBA_4_0/source/utils/testparm.c	2006-09-06 12:21:13 UTC (rev 18167)
+++ branches/SAMBA_4_0/source/utils/testparm.c	2006-09-06 12:28:01 UTC (rev 18168)
@@ -106,7 +106,7 @@
 		{"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);



More information about the samba-cvs mailing list