summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0fe925)
raw | patch | inline | side by side (parent: c0fe925)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 Nov 2001 08:41:16 +0000 (08:41 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 Nov 2001 08:41:16 +0000 (08:41 +0000) |
program/src/rrd_cgi.c | patch | blob | history |
diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c
index e79ecb7c1bee78fa1d6ad49a52cbe4b1167cac3e..14ce2d48cb2671d3421e16c10368e4052fa30383 100644 (file)
--- a/program/src/rrd_cgi.c
+++ b/program/src/rrd_cgi.c
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){