summaryrefslogtreecommitdiffstats
path: root/xstd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xstd.c')
-rw-r--r--xstd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xstd.c b/xstd.c
index a7262a61..45d5c43f 100644
--- a/xstd.c
+++ b/xstd.c
@@ -63,6 +63,16 @@ xstrlcpy(char *dst, const char *src, size_t sz)
}
void *
+xrealloc(void *ptr, size_t sz)
+{
+ void *p;
+
+ if (NULL == (p = realloc(ptr, sz)))
+ err(EXIT_FAILURE, "realloc");
+ return(p);
+}
+
+void *
xcalloc(size_t num, size_t sz)
{
void *p;