aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-05 18:36:38 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-05 18:36:38 +0000
commit6fb29176d8c099607100c1261328c9ea68a744db (patch)
tree9e999f98490e2c55501950ac00724d6bb52ff5f1 /src/util
parentb730f77294aaaff4761e42804deda8c22caf4771 (diff)
downloadgnunet-6fb29176d8c099607100c1261328c9ea68a744db.tar.gz
gnunet-6fb29176d8c099607100c1261328c9ea68a744db.zip
treat empty string as NULL
Diffstat (limited to 'src/util')
-rw-r--r--src/util/common_logging.c3
-rw-r--r--src/util/test_common_logging_runtime_loglevels.c2
2 files changed, 3 insertions, 2 deletions
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)
546 component_nopid = GNUNET_strdup (comp); 546 component_nopid = GNUNET_strdup (comp);
547 547
548 env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); 548 env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
549 if (env_logfile != NULL) 549 if ( (env_logfile != NULL) &&
550 (strlen (env_logfile) > 0) )
550 logfile = env_logfile; 551 logfile = env_logfile;
551 552
552 if (logfile == NULL) 553 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 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2008 Christian Grothoff (and other contributing authors) 3 (C) 2011 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published