aboutsummaryrefslogtreecommitdiffstats
path: root/xmalloc.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-12-30 18:27:14 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-12-30 18:27:14 +0000
commit28b12aba4ad1b56c1acfea4e20c1a81b91221d45 (patch)
treea9f7706d3dc84c6157ec5226e9a9d4306fcc36e1 /xmalloc.c
parentff4d046f39e3ed641bc5d9925f61d48010c56bfb (diff)
downloadfetchmail-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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 3c231294..8e085b0c 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -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;