projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Module setenv does not depend on 'malloc-posix', 'realloc-posix'.
[gnulib.git]
/
lib
/
setenv.c
diff --git
a/lib/setenv.c
b/lib/setenv.c
index
ee9da0d
..
178191c
100644
(file)
--- a/
lib/setenv.c
+++ b/
lib/setenv.c
@@
-147,6
+147,9
@@
__add_to_environ (const char *name, const char *value, const char *combined,
: realloc (last_environ, (size + 2) * sizeof (char *)));
if (new_environ == NULL)
{
+ /* It's easier to set errno to ENOMEM than to rely on the
+ 'malloc-posix' and 'realloc-posix' gnulib modules. */
+ __set_errno (ENOMEM);
UNLOCK;
return -1;
}