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
This commit is contained in:
parent
dd1eb0f437
commit
5a08b84f83
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user