summaryrefslogtreecommitdiff
path: root/source3/lib/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/debug.c')
-rw-r--r--source3/lib/debug.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 9eb490c27e..6524d58ecb 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -346,8 +346,14 @@ BOOL reopen_logs( void )
oldumask = umask( 022 );
pstrcpy(fname, debugf );
- if (lp_loaded() && (*lp_logfile()))
- pstrcpy(fname, lp_logfile());
+
+ if (lp_loaded()) {
+ char *logfname;
+
+ logfname = lp_logfile();
+ if (*logfname)
+ pstrcpy(fname, logfname);
+ }
pstrcpy( debugf, fname );
if (append_log)