diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-12-30 18:27:14 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-12-30 18:27:14 +0000 |
commit | 28b12aba4ad1b56c1acfea4e20c1a81b91221d45 (patch) | |
tree | a9f7706d3dc84c6157ec5226e9a9d4306fcc36e1 /xmalloc.c | |
parent | ff4d046f39e3ed641bc5d9925f61d48010c56bfb (diff) | |
download | fetchmail-28b12aba4ad1b56c1acfea4e20c1a81b91221d45.tar.gz fetchmail-28b12aba4ad1b56c1acfea4e20c1a81b91221d45.tar.bz2 fetchmail-28b12aba4ad1b56c1acfea4e20c1a81b91221d45.zip |
Dave Bodenstab's error changes.
svn path=/trunk/; revision=705
Diffstat (limited to 'xmalloc.c')
-rw-r--r-- | xmalloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -30,6 +30,17 @@ xmalloc (int n) return(p); } +XMALLOCTYPE * +xrealloc (XMALLOCTYPE *p, int n) +{ + if (p == 0) + return xmalloc (n); + p = (XMALLOCTYPE *) realloc(p, n); + if (p == (XMALLOCTYPE *) 0) + error(PS_UNDEFINED, errno, "realloc failed"); + return p; +} + char *xstrdup(const char *s) { char *p; |