projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
xmalloc: revert yesterday's regression
[gnulib.git]
/
lib
/
xmalloc.c
diff --git
a/lib/xmalloc.c
b/lib/xmalloc.c
index
4589e7d
..
08c30fb
100644
(file)
--- a/
lib/xmalloc.c
+++ b/
lib/xmalloc.c
@@
-52,7
+52,7
@@
xmalloc (size_t n)
void *
xrealloc (void *p, size_t n)
{
- if (!n)
+ if (!n
&& p
)
{
/* The GNU and C99 realloc behaviors disagree here. Act like
GNU, even if the underlying realloc is C99. */
@@
-61,7
+61,7
@@
xrealloc (void *p, size_t n)
}
p = realloc (p, n);
- if (!p)
+ if (!p
&& n
)
xalloc_die ();
return p;
}