X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Ffmt_new.c;h=c1bc7c730e83edfccf4462ba2094ea50d3af89fb;hp=003ec2bc6461cb0b77a09e544addef8bf8b52e9e;hb=0aef47ae5c03e1d9e3f225efe5ae362e7cf5ee35;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b diff --git a/sbr/fmt_new.c b/sbr/fmt_new.c index 003ec2b..c1bc7c7 100644 --- a/sbr/fmt_new.c +++ b/sbr/fmt_new.c @@ -3,9 +3,14 @@ * 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 '\\' @@ -37,8 +42,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");