X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Fbrkstring.c;h=255abf7465bf8c5a97d7d7b026894f6100f82eb1;hb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;hp=715aaf5e2b65a3bc394804861c9354e75c94ff68;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/brkstring.c b/sbr/brkstring.c index 715aaf5..255abf7 100644 --- a/sbr/brkstring.c +++ b/sbr/brkstring.c @@ -4,9 +4,14 @@ * -- an array of substrings * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include +#include /* allocate this number of pointers at a time */ #define NUMBROKEN 256 @@ -29,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))); } /*