svn commit: samba r9790 - branches/SAMBA_3_0/source/nmbd branches/SAMBA_3_0/source/web trunk/source/nmbd trunk/source/web

jerry at samba.org jerry at samba.org
Tue Aug 30 11:41:45 GMT 2005


Author: jerry
Date: 2005-08-30 11:41:45 +0000 (Tue, 30 Aug 2005)
New Revision: 9790

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

Log:
remove 'set but not used' variables (reported by Jason Mader)
Modified:
   branches/SAMBA_3_0/source/nmbd/nmbd.c
   branches/SAMBA_3_0/source/web/swat.c
   trunk/source/nmbd/nmbd.c
   trunk/source/web/swat.c


Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd.c
===================================================================
--- branches/SAMBA_3_0/source/nmbd/nmbd.c	2005-08-30 11:37:58 UTC (rev 9789)
+++ branches/SAMBA_3_0/source/nmbd/nmbd.c	2005-08-30 11:41:45 UTC (rev 9790)
@@ -650,7 +650,6 @@
 	pstring logfile;
 	static BOOL opt_interactive;
 	poptContext pc;
-	int opt;
 	struct poptOption long_options[] = {
 	POPT_AUTOHELP
 	{"daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon(default)" },
@@ -666,7 +665,7 @@
 	global_nmb_port = NMB_PORT;
 
 	pc = poptGetContext("nmbd", argc, argv, long_options, 0);
-	while ((opt = poptGetNextOpt(pc)) != -1) ;
+	while (poptGetNextOpt(pc) != -1) {};
 	poptFreeContext(pc);
 
 	global_in_nmbd = True;

Modified: branches/SAMBA_3_0/source/web/swat.c
===================================================================
--- branches/SAMBA_3_0/source/web/swat.c	2005-08-30 11:37:58 UTC (rev 9789)
+++ branches/SAMBA_3_0/source/web/swat.c	2005-08-30 11:41:45 UTC (rev 9790)
@@ -1331,13 +1331,12 @@
  **/
  int main(int argc, char *argv[])
 {
-	int opt;
 	const char *page;
 	poptContext pc;
 	struct poptOption long_options[] = {
 		POPT_AUTOHELP
 		{ "disable-authentication", 'a', POPT_ARG_VAL, &demo_mode, True, "Disable authentication (demo mode)" },
-        { "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only change password menu" }, 
+        	{ "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only change password menu" }, 
 		POPT_COMMON_SAMBA
 		POPT_TABLEEND
 	};
@@ -1368,7 +1367,7 @@
 
 	/* Parse command line options */
 
-	while((opt = poptGetNextOpt(pc)) != -1) { }
+	while(poptGetNextOpt(pc) != -1) { }
 
 	poptFreeContext(pc);
 

Modified: trunk/source/nmbd/nmbd.c
===================================================================
--- trunk/source/nmbd/nmbd.c	2005-08-30 11:37:58 UTC (rev 9789)
+++ trunk/source/nmbd/nmbd.c	2005-08-30 11:41:45 UTC (rev 9790)
@@ -650,7 +650,6 @@
 	pstring logfile;
 	static BOOL opt_interactive;
 	poptContext pc;
-	int opt;
 	struct poptOption long_options[] = {
 	POPT_AUTOHELP
 	{"daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon(default)" },
@@ -666,7 +665,7 @@
 	global_nmb_port = NMB_PORT;
 
 	pc = poptGetContext("nmbd", argc, argv, long_options, 0);
-	while ((opt = poptGetNextOpt(pc)) != -1) ;
+	while (poptGetNextOpt(pc) != -1) {};
 	poptFreeContext(pc);
 
 	global_in_nmbd = True;

Modified: trunk/source/web/swat.c
===================================================================
--- trunk/source/web/swat.c	2005-08-30 11:37:58 UTC (rev 9789)
+++ trunk/source/web/swat.c	2005-08-30 11:41:45 UTC (rev 9790)
@@ -1386,13 +1386,12 @@
  **/
  int main(int argc, char *argv[])
 {
-	int opt;
 	const char *page;
 	poptContext pc;
 	struct poptOption long_options[] = {
 		POPT_AUTOHELP
 		{ "disable-authentication", 'a', POPT_ARG_VAL, &demo_mode, True, "Disable authentication (demo mode)" },
-        { "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only change password menu" }, 
+        	{ "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only change password menu" }, 
 		POPT_COMMON_SAMBA
 		POPT_TABLEEND
 	};
@@ -1423,7 +1422,7 @@
 
 	/* Parse command line options */
 
-	while((opt = poptGetNextOpt(pc)) != -1) { }
+	while(poptGetNextOpt(pc) != -1) { }
 
 	poptFreeContext(pc);
 



More information about the samba-cvs mailing list