X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Ffmt_new.c;h=44a18b3772e97de05b12a4ca933dbb7f3b029b4d;hp=effd06f1ae98323a93f3c81b97a64ef256897088;hb=5dd6771b28c257af405d7248639ed0e3bcdce38b;hpb=6c42153ad9362cc676ea66563bf400d7511b3b68 diff --git a/sbr/fmt_new.c b/sbr/fmt_new.c index effd06f..44a18b3 100644 --- a/sbr/fmt_new.c +++ b/sbr/fmt_new.c @@ -2,14 +2,13 @@ /* * fmt_new.c -- read format file/string and normalize * - * $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 #define QUOTE '\\' @@ -41,8 +40,7 @@ new_fs (char *form, char *format, char *default_fs) if (fstat (fileno (fp), &st) == -1) adios (form, "unable to stat format file"); - if (!(formats = malloc ((size_t) st.st_size + 1))) - adios (form, "unable to allocate space for format"); + formats = mh_xmalloc ((size_t) st.st_size + 1); if (read (fileno(fp), formats, (int) st.st_size) != st.st_size) adios (form, "error reading format file");