From 52f4dfa6fcc60eb36f7f59747387fd10855046cd Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 5 Apr 2006 07:44:14 +0000 Subject: r14923: Return False in the case a parametrical option is not configured in the config file. For a "somesettings: foo = " we still return an empty line. (This used to be commit 59175ee522c5b4f9554ee734c008d8048eb1eadb) --- source3/param/loadparm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 95c095dcf2..b7d6546fd9 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3883,6 +3883,7 @@ BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal) unsigned flag = 0; fstring local_parm_name; char *parm_opt; + const char *parm_opt_value; /* check for parametrical option */ fstrcpy( local_parm_name, parm_name); @@ -3892,9 +3893,12 @@ BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal) *parm_opt = '\0'; parm_opt++; if (strlen(parm_opt)) { - printf( "%s\n", lp_parm_const_string( snum, - local_parm_name, parm_opt, "")); - result = True; + parm_opt_value = lp_parm_const_string( snum, + local_parm_name, parm_opt, NULL); + if (parm_opt_value) { + printf( "%s\n", parm_opt_value); + result = True; + } } return result; } -- cgit