* patch #3967: Create a mh_xrealloc function to prevent mistakes when
[mmh] / uip / packf.c
index 9f71b92..6f3638c 100644 (file)
@@ -119,9 +119,8 @@ main (int argc, char **argv)
             */
            if (nummsgs >= maxmsgs) {
                maxmsgs += MAXMSGS;
-               if (!(msgs = (char **) realloc (msgs,
-                       (size_t) (maxmsgs * sizeof(*msgs)))))
-                   adios (NULL, "unable to reallocate msgs storage");
+               msgs = (char **) mh_xrealloc (msgs,
+                   (size_t) (maxmsgs * sizeof(*msgs)));
            }
            msgs[nummsgs++] = cp;
        }