From f3aaae101dc2e2094b1a584756e6fee3775f4961 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 18 Nov 2001 08:41:16 +0000 Subject: [PATCH] return "" instead of NULL for -- Michael git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@55 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_cgi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index e79ecb7..14ce2d4 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -211,8 +211,13 @@ char* rrdsetenv(long argc, char **args){ char* rrdgetenv(long argc, char **args){ if (argc != 1) { return stralloc("[ERROR: getenv faild because it did not get 1 argument only]"); - }; - return stralloc(getenv(args[0])); + } + else if (getenv(args[0]) == NULL) { + return stralloc(""); + } + else { + return stralloc(getenv(args[0])); + } } char* rrdgoodfor(long argc, char **args){ -- 2.11.0