Explorar el Código

remove errno setting from setenv, malloc sets it correctly on oom

Szabolcs Nagy hace 11 años
padre
commit
4405702a41
Se han modificado 1 ficheros con 0 adiciones y 1 borrados
  1. 0 1
      src/env/setenv.c

+ 0 - 1
src/env/setenv.c

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