From: oetiker Date: Sun, 18 Nov 2001 08:41:16 +0000 (+0000) Subject: return "" instead of NULL for -- Michael -- Michael git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@55 a5681a0c-68f1-0310-ab6d-d61299d08faa --- 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){