Remove unnecessary ifdef about unsetenv() return value
Posix now mandates that unsetenv() must return -1 and set errno on error.
This commit is contained in:
parent
95a1c1032c
commit
267cd00146
|
@ -376,12 +376,7 @@ static value_t fl_os_setenv(value_t *args, uint32_t nargs)
|
||||||
char *name = tostring(args[0], "os.setenv");
|
char *name = tostring(args[0], "os.setenv");
|
||||||
int result;
|
int result;
|
||||||
if (args[1] == FL_F) {
|
if (args[1] == FL_F) {
|
||||||
#ifdef LINUX
|
|
||||||
result = unsetenv(name);
|
result = unsetenv(name);
|
||||||
#else
|
|
||||||
(void)unsetenv(name);
|
|
||||||
result = 0;
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
char *val = tostring(args[1], "os.setenv");
|
char *val = tostring(args[1], "os.setenv");
|
||||||
result = setenv(name, val, 1);
|
result = setenv(name, val, 1);
|
||||||
|
|
Loading…
Reference in New Issue