* patch #3967: Create a mh_xrealloc function to prevent mistakes when
[mmh] / sbr / fmt_addr.c
index 97f4271..d71d956 100644 (file)
@@ -29,11 +29,9 @@ static unsigned int bufsiz;  /* current size of buf         */
                int i = dst - buf;\
                int n = last_dst - buf;\
                bufsiz += ((dst + len - bufend) / BUFINCR + 1) * BUFINCR;\
-               buf = realloc (buf, bufsiz);\
+               buf = mh_xrealloc (buf, bufsiz);\
                dst = buf + i;\
                last_dst = buf + n;\
-               if (! buf)\
-                   adios (NULL, "formataddr: couldn't get buffer space");\
                bufend = buf + bufsiz;\
            }