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:
Lassi Kortela 2019-08-10 00:05:31 +03:00
parent 95a1c1032c
commit 267cd00146
1 changed files with 0 additions and 5 deletions

View File

@ -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);