X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=util.c;h=82067997b5242f34e7491d0f103ce6793e64c675;hb=refs%2Fheads%2Fmaster;hp=e211755461be58e75375b95739b9a1ce68c391c3;hpb=60687231eb923234756020bf9d9cccd20551fd90;p=checkmail.git diff --git a/util.c b/util.c index e211755..8206799 100644 --- a/util.c +++ b/util.c @@ -47,6 +47,15 @@ xmalloc(uns size) return buf; } +void * +xrealloc(void *old, uns size) +{ + void *buf = realloc(old, size); + if (!buf) + die("Unable to allocate %d bytes of memory", size); + return buf; +} + char * xstrdup(char *s) {