X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fbrkstring.c;h=255abf7465bf8c5a97d7d7b026894f6100f82eb1;hp=27f187e2e72daaf9ff2b3a1b96e740a7977ee115;hb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;hpb=582d618b69077087961c367bd1631495906c92a8 diff --git a/sbr/brkstring.c b/sbr/brkstring.c index 27f187e..255abf7 100644 --- a/sbr/brkstring.c +++ b/sbr/brkstring.c @@ -11,6 +11,7 @@ */ #include +#include /* allocate this number of pointers at a time */ #define NUMBROKEN 256 @@ -33,8 +34,7 @@ brkstring (char *str, char *brksep, char *brkterm) /* allocate initial space for pointers on first call */ if (!broken) { len = NUMBROKEN; - if (!(broken = (char **) malloc ((size_t) (len * sizeof(*broken))))) - adios (NULL, "unable to malloc array in brkstring"); + broken = (char **) mh_xmalloc ((size_t) (len * sizeof(*broken))); } /*