-/* $Id: xstd.c,v 1.5 2009/01/20 22:55:46 kristaps Exp $ */
+/* $Id: xstd.c,v 1.6 2009/02/28 13:47:36 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
return(strlcpy(dst, src, sz) < 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)
{