X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Ffolder.c;h=3348ae56b90dc6b47e3299cece827ce496e30545;hb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;hp=e4779dc532e5c7e7dccb7fc352d9d90729b24970;hpb=582d618b69077087961c367bd1631495906c92a8;p=mmh diff --git a/uip/folder.c b/uip/folder.c index e4779dc..3348ae5 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -12,6 +12,7 @@ */ #include +#include #include static struct swit switches[] = { @@ -353,13 +354,11 @@ main (int argc, char **argv) /* Allocate initial space to record folder names */ maxfolders = NUMFOLDERS; - if ((folds = malloc (maxfolders * sizeof(char *))) == NULL) - adios (NULL, "unable to allocate storage for folder names"); + folds = mh_xmalloc (maxfolders * sizeof(char *)); /* Allocate initial space to record folder information */ maxFolderInfo = NUMFOLDERS; - if ((fi = malloc (maxFolderInfo * sizeof(*fi))) == NULL) - adios (NULL, "unable to allocate storage for folder info"); + fi = mh_xmalloc (maxFolderInfo * sizeof(*fi)); /* * Scan the folders