* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh] / sbr / concat.c
index 939a484..4d4e15c 100644 (file)
@@ -4,9 +4,14 @@
  *             of strings in managed memory
  *
  * $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 <h/mh.h>
+#include <h/utils.h>
 
 
 char *
@@ -22,8 +27,7 @@ concat (char *s1, ...)
        len += strlen (cp);
     va_end(list);
 
-    if (!(dp = sp = malloc(len)))
-       adios (NULL, "unable to allocate string storage");
+    dp = sp = mh_xmalloc(len);
 
     sp = copy(s1, sp);