git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ce1958
)
r24616: In set_boolean(), only pass the result back to the caller
author
Michael Adam
<obnox@samba.org>
Wed, 22 Aug 2007 10:47:32 +0000
(10:47 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:30:10 +0000
(12:30 -0500)
if parsing of the boolean string was successful.
Also, initialize the local result variable
(although not strictly necessary anymore, now.)
source/param/loadparm.c
patch
|
blob
|
history
diff --git
a/source/param/loadparm.c
b/source/param/loadparm.c
index 6e05e5e5547080fac1784df01a2e9b2ef96834c5..adcf3522ee1e3b8c498773c58adbd2c4912a79fc 100644
(file)
--- a/
source/param/loadparm.c
+++ b/
source/param/loadparm.c
@@
-3090,6
+3090,7
@@
static BOOL set_boolean(BOOL *pb, const char *pszParmValue)
BOOL value;
bRetval = True;
+ value = False;
if (strwicmp(pszParmValue, "yes") == 0 ||
strwicmp(pszParmValue, "true") == 0 ||
strwicmp(pszParmValue, "1") == 0)
@@
-3105,7
+3106,7
@@
static BOOL set_boolean(BOOL *pb, const char *pszParmValue)
bRetval = False;
}
- if (
pb != NULL
) {
+ if (
(pb != NULL) && (bRetval != False)
) {
*pb = value;
}