From 3a0b4fb26ad4c6f7c8d8ef2861c1b45253f30400 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 4 Apr 2003 15:51:55 +0000 Subject: [PATCH] * libamu/xutil.c (switch_to_logfile): don't try to print logfile if it is null (strlen core dump on solaris). Bug report from John P. Rouillard . --- ChangeLog | 6 ++++++ libamu/xutil.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 002f9b7..b8fce6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-04-04 Erez Zadok + + * libamu/xutil.c (switch_to_logfile): don't try to print logfile + if it is null (strlen core dump on solaris). Bug report from John + P. Rouillard . + 2003-03-31 Erez Zadok * fsinfo/fsinfo.8: typo co-ordinate -> coordinate. Typo report diff --git a/libamu/xutil.c b/libamu/xutil.c index 92084ef..ad1cd99 100644 --- a/libamu/xutil.c +++ b/libamu/xutil.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: xutil.c,v 1.29 2002/12/28 22:28:57 ib42 Exp $ + * $Id: xutil.c,v 1.30 2003/04/04 15:51:56 ezk Exp $ * */ @@ -813,7 +813,11 @@ switch_to_logfile(char *logfile, int old_umask) (void) fclose(logfp); logfp = new_logfp; - plog(XLOG_INFO, "switched to logfile \"%s\"", logfile); + if (logfile) + plog(XLOG_INFO, "switched to logfile \"%s\"", logfile); + else + plog(XLOG_INFO, "no logfile defined; using stderr"); + return 0; } -- 2.43.0