#include "alloc/malloc.h"
#include "alloc/realloc.h"
+#include "alloc/x/xrealloc.h"
#include "prototypes.h"
#include "defines.h"
size_t nelem = *nlist, size;
while (s != NULL && *s != '\0') {
- ptr = REALLOC(*list, nelem + 1, char *);
- if (ptr == NULL)
- return NULL;
-
+ ptr = XREALLOC(*list, nelem + 1, char *);
ptr[nelem] = strsep(&s, ",");
nelem++;
*list = ptr;
*nlist = nelem;
}
- ptr = REALLOC(*list, nelem + 1, char *);
- if (ptr == NULL)
- return NULL;
-
+ ptr = XREALLOC(*list, nelem + 1, char *);
ptr[nelem] = NULL;
*list = ptr;