summaryrefslogtreecommitdiff
path: root/source4/param/loadparm.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-16 14:58:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:50 -0500
commit7c017f9015136e8641555576c1aecabaf66cb83e (patch)
treeb6e5a134f6e48b3f69472b1fafc8be5e07e07942 /source4/param/loadparm.c
parent61939ce118654ef4a212cbe6a21b6aa4d9733a6b (diff)
downloadsamba-7c017f9015136e8641555576c1aecabaf66cb83e.tar.gz
samba-7c017f9015136e8641555576c1aecabaf66cb83e.tar.bz2
samba-7c017f9015136e8641555576c1aecabaf66cb83e.zip
r18579: fixed boolean parameters on big endian hosts which have
sizeof(BOOL) != sizeof(int) this broke with the conversion to a real BOOL type (This used to be commit 75dab73ac603968ce49c605e07d43051dbfa7398)
Diffstat (limited to 'source4/param/loadparm.c')
-rw-r--r--source4/param/loadparm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 55d15653f6..2b2926d053 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -1861,11 +1861,14 @@ BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
/* now switch on the type of variable it is */
switch (parm_table[parmnum].type)
{
- case P_BOOL:
- if (!set_boolean(pszParmValue, parm_ptr)) {
+ case P_BOOL: {
+ BOOL b;
+ if (!set_boolean(pszParmValue, &b)) {
DEBUG(0,("lp_do_parameter(%s): value is not boolean!\n", pszParmValue));
return False;
}
+ *(int *)parm_ptr = b;
+ }
break;
case P_INTEGER: