From 920db6d3935c86aff1b4fd0096ce6b5e3605d20d Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 19 Jan 2015 22:49:10 +0100 Subject: libc: Avoid redundant setting of ENOMEM Signed-off-by: Bernhard Reutner-Fischer --- libc/stdlib/setenv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/stdlib/setenv.c') diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c index 00e3f3d65..f3b53b6c5 100644 --- a/libc/stdlib/setenv.c +++ b/libc/stdlib/setenv.c @@ -76,7 +76,7 @@ static int __add_to_environ(const char *name, const char *value, /* We allocated this space; we can extend it. */ new_environ = realloc(last_environ, (size + 2) * sizeof(char *)); if (new_environ == NULL) { - __set_errno(ENOMEM); + /* __set_errno(ENOMEM); */ goto DONE; } if (__environ != last_environ) { @@ -97,7 +97,7 @@ static int __add_to_environ(const char *name, const char *value, var_val = malloc(namelen + 1 + vallen); if (var_val == NULL) { - __set_errno(ENOMEM); + /* __set_errno(ENOMEM); */ goto DONE; } memcpy(var_val, name, namelen); -- cgit v1.2.3