* mh_xmalloc(), mh_xrealloc(), pwd(): Add comments describing the purpose
[mmh] / sbr / add.c
index f38110f..40201c1 100644 (file)
--- a/sbr/add.c
+++ b/sbr/add.c
@@ -8,9 +8,14 @@
  *       -- malloc'ed memory.  Then free "s1".
  *
  * $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 *
 add (char *s2, char *s1)
@@ -24,8 +29,7 @@ add (char *s2, char *s1)
        len2 = strlen (s2);
 
 
-    if (!(cp = malloc (len1 + len2 + 1)))
-       adios (NULL, "unable to allocate string storage");
+    cp = mh_xmalloc (len1 + len2 + 1);
 
     /* Copy s1 and free it */
     if (s1) {