diff options
author | John Baldwin <jhb@FreeBSD.org> | 2001-10-25 17:22:31 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2001-10-25 17:22:31 +0000 |
commit | 5a08b84f834d9e2aefb5bbb17d228a2b83e84ea7 (patch) | |
tree | 3d93326c3bf478b39d5ac6881de0d1e9d1d58c3c /sys | |
parent | dd1eb0f4372b9a3bc209bc75290e86d97cbdaba5 (diff) | |
download | src-5a08b84f834d9e2aefb5bbb17d228a2b83e84ea7.tar.gz src-5a08b84f834d9e2aefb5bbb17d228a2b83e84ea7.zip |
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
Notes
Notes:
svn path=/head/; revision=85493
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_environment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c index 08af003df136..6ebc017a1502 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); |