From: Christian Grothoff Date: Sat, 5 Nov 2011 18:36:38 +0000 (+0000) Subject: treat empty string as NULL X-Git-Tag: initial-import-from-subversion-38251~16022 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6fb29176d8c099607100c1261328c9ea68a744db;p=oweals%2Fgnunet.git treat empty string as NULL --- diff --git a/src/util/common_logging.c b/src/util/common_logging.c index d564530cc..101f2fd9f 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -546,7 +546,8 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile) component_nopid = GNUNET_strdup (comp); env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); - if (env_logfile != NULL) + if ( (env_logfile != NULL) && + (strlen (env_logfile) > 0) ) logfile = env_logfile; if (logfile == NULL) diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 5c069dc9f..79b888c56 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2008 Christian Grothoff (and other contributing authors) + (C) 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published