remove errno setting from setenv, malloc sets it correctly on oom
authorSzabolcs Nagy <nsz@port70.net>
Mon, 7 Oct 2013 13:26:51 +0000 (13:26 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Mon, 7 Oct 2013 13:26:51 +0000 (13:26 +0000)
src/env/setenv.c

index 0a45896..76e8ee1 100644 (file)
@@ -26,6 +26,5 @@ int setenv(const char *var, const char *value, int overwrite)
                if (!__putenv(s, 1)) return 0;
        }
        free(s);
-       errno = ENOMEM;
        return -1;
 }