summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/popt_common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index c9f70d6527..aaec448762 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -41,16 +41,17 @@ static void popt_common_callback(poptContext con,
const char *arg, const void *data)
{
pstring logfile;
- char *pname;
+ const char *pname;
/* Find out basename of current program */
pname = strrchr_m(poptGetInvocationName(con),'/');
- if(!pname)pname = poptGetInvocationName(con);
- else pname++;
+ if (!pname)
+ pname = poptGetInvocationName(con);
+ else
+ pname++;
if (reason == POPT_CALLBACK_REASON_PRE) {
- pstring logfile;
pstr_sprintf(logfile, "%s/log.%s", dyn_LOGFILEBASE, pname);
lp_set_logfile(logfile);
return;