]> git.marmaro.de Git - mmh/blobdiff - sbr/concat.c
* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh] / sbr / concat.c
index 939a484f4579fc5ef2f0c4f209126e5f8e2b60df..4d4e15c1fd9191d76b6674764ea74f7c69ba1e7d 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);