cvsimport

This commit is contained in:
okan
2015-03-29 00:21:05 +00:00
8 changed files with 39 additions and 33 deletions

View File

@@ -61,6 +61,18 @@ xcalloc(size_t no, size_t siz)
return(p);
}
void *
xreallocarray(void *ptr, size_t nmemb, size_t size)
{
void *p;
p = reallocarray(ptr, nmemb, size);
if (p == NULL)
errx(1, "xreallocarray: out of memory (new_size %zu bytes)",
nmemb * size);
return(p);
}
char *
xstrdup(const char *str)
{