svn commit: samba r24616 - in branches: SAMBA_3_2/source/param SAMBA_3_2_0/source/param

obnox at samba.org obnox at samba.org
Wed Aug 22 10:47:33 GMT 2007


Author: obnox
Date: 2007-08-22 10:47:32 +0000 (Wed, 22 Aug 2007)
New Revision: 24616

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

Log:
In set_boolean(), only pass the result back to the caller 
if parsing of the boolean string was successful.
Also, initialize the local result variable
(although not strictly necessary anymore, now.)


Modified:
   branches/SAMBA_3_2/source/param/loadparm.c
   branches/SAMBA_3_2_0/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_2/source/param/loadparm.c
===================================================================
--- branches/SAMBA_3_2/source/param/loadparm.c	2007-08-22 09:32:37 UTC (rev 24615)
+++ branches/SAMBA_3_2/source/param/loadparm.c	2007-08-22 10:47:32 UTC (rev 24616)
@@ -3090,6 +3090,7 @@
 	BOOL value;
 
 	bRetval = True;
+	value = False;
 	if (strwicmp(pszParmValue, "yes") == 0 ||
 	    strwicmp(pszParmValue, "true") == 0 ||
 	    strwicmp(pszParmValue, "1") == 0)
@@ -3105,7 +3106,7 @@
 		bRetval = False;
 	}
 
-	if (pb != NULL) {
+	if ((pb != NULL) && (bRetval != False)) {
 		*pb = value;
 	}
 

Modified: branches/SAMBA_3_2_0/source/param/loadparm.c
===================================================================
--- branches/SAMBA_3_2_0/source/param/loadparm.c	2007-08-22 09:32:37 UTC (rev 24615)
+++ branches/SAMBA_3_2_0/source/param/loadparm.c	2007-08-22 10:47:32 UTC (rev 24616)
@@ -3095,6 +3095,7 @@
 	BOOL value;
 
 	bRetval = True;
+	value = False;
 	if (strwicmp(pszParmValue, "yes") == 0 ||
 	    strwicmp(pszParmValue, "true") == 0 ||
 	    strwicmp(pszParmValue, "1") == 0)
@@ -3110,7 +3111,7 @@
 		bRetval = False;
 	}
 
-	if (pb != NULL) {
+	if ((pb != NULL) && (bRetval != False)) {
 		*pb = value;
 	}
 



More information about the samba-cvs mailing list