X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=sbr%2Fvfgets.c;h=3a376e10d6614fa3c1274359d5a78dd8dc7562a0;hb=5dd6771b28c257af405d7248639ed0e3bcdce38b;hp=beb0afd0a43853249c588c0250951e67eb87b65b;hpb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;p=mmh diff --git a/sbr/vfgets.c b/sbr/vfgets.c index beb0afd..3a376e1 100644 --- a/sbr/vfgets.c +++ b/sbr/vfgets.c @@ -2,8 +2,6 @@ /* * vfgets.c -- virtual fgets * - * $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. @@ -66,12 +64,9 @@ wrong_guess: if (cp >= ep) { int curlen = cp - pp; - if (!(dp = realloc (pp, (size_t) (len += BUFSIZ)))) { - adios (NULL, "unable to allocate string storage"); - } else { - cp = dp + curlen; - ep = (pp = dp) + len - 1; - } + dp = mh_xrealloc (pp, (size_t) (len += BUFSIZ)); + cp = dp + curlen; + ep = (pp = dp) + len - 1; } } }