diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-01-19 22:49:10 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-01-22 11:39:24 +0100 |
commit | 920db6d3935c86aff1b4fd0096ce6b5e3605d20d (patch) | |
tree | 52a5bf033372732018de77d7bd243cb3304ee981 /libc/stdlib/setenv.c | |
parent | 78b154a95b507c205241dd883396952e0dfbede7 (diff) |
libc: Avoid redundant setting of ENOMEM
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/stdlib/setenv.c')
-rw-r--r-- | libc/stdlib/setenv.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |