summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-12-13 09:13:35 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:51 +0100
commit21b024aa82b49a05919e89885e60913c8cb444b2 (patch)
treec5d547f55cf8db611768e99ea7910f25dd5b3ae8 /source4/param
parent8530e8429ac7b12f4bde285af2b7933610461253 (diff)
downloadsamba-21b024aa82b49a05919e89885e60913c8cb444b2.tar.gz
samba-21b024aa82b49a05919e89885e60913c8cb444b2.tar.bz2
samba-21b024aa82b49a05919e89885e60913c8cb444b2.zip
r26423: try to fix the build on solaris
metze (This used to be commit 5b62180946a7cb9f3981ce740cfe830f6f0a00ff)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 07b8cbbdf4..8b84cefc19 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2252,7 +2252,12 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
parm_table[i].type == P_USTRING) &&
parm_table[i].offset != -1 &&
!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
- char **r = ((char *)(parm_table[i].class == P_LOCAL)?&sDefault:lp_ctx->globals) + parm_table[i].offset;
+ char **r;
+ if (parm_table[i].class == P_LOCAL) {
+ r = (char **)(&sDefault + parm_table[i].offset);
+ } else {
+ r = (char **)(lp_ctx->globals + parm_table[i].offset);
+ }
*r = talloc_strdup(lp_ctx, "");
}
}