From 750eb154f1760a450b36f69630c809b2e7681e78 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 25 Oct 2001 17:22:31 +0000 Subject: Fix an inverted test csae. Success of getenv() is determined by a return value of !NUL rather than NUL. Submitted by: luigi Pointy hat to: jhb --- sys/kern/kern_environment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c index 08af003..6ebc017 100644 --- a/sys/kern/kern_environment.c +++ b/sys/kern/kern_environment.c @@ -76,7 +76,7 @@ getenv_string(const char *name, char *data, int size) char *tmp; tmp = getenv(name); - if (tmp == NULL) { + if (tmp != NULL) { strncpy(data, tmp, size); data[size - 1] = 0; return (1); -- cgit v1.1