X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fvfgets.c;h=beb0afd0a43853249c588c0250951e67eb87b65b;hp=39cfaa276de7e5291b6dfe6813f484bfc80956cb;hb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;hpb=582d618b69077087961c367bd1631495906c92a8 diff --git a/sbr/vfgets.c b/sbr/vfgets.c index 39cfaa2..beb0afd 100644 --- a/sbr/vfgets.c +++ b/sbr/vfgets.c @@ -10,6 +10,7 @@ */ #include +#include #define QUOTE '\\' @@ -23,8 +24,7 @@ vfgets (FILE *in, char **bp) static char *pp = NULL; if (pp == NULL) - if (!(pp = malloc ((size_t) (len = BUFSIZ)))) - adios (NULL, "unable to allocate string storage"); + pp = mh_xmalloc ((size_t) (len = BUFSIZ)); for (ep = (cp = pp) + len - 1;;) { if (fgets (cp, ep - cp + 1, in) == NULL) {