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 0a458968669a6280f070271a80a6069af9152b43..76e8ee1206e5b5a4111b8c58481932952de6084f 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;
 }