Remove RCS keywords, since they no longer work after git migration.
[mmh] / sbr / putenv.c
index 649b015..dd66514 100644 (file)
@@ -2,14 +2,13 @@
 /*
  * putenv.c -- (un)set an envariable
  *
- * $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>
 
 extern char **environ;
 
@@ -27,8 +26,7 @@ m_putenv (char *name, char *value)
     register int i;
     register char **ep, **nep, *cp;
 
-    if (!(cp = malloc ((size_t) (strlen (name) + strlen (value) + 2))))
-       return 1;
+    cp = mh_xmalloc ((size_t) (strlen (name) + strlen (value) + 2));
 
     sprintf (cp, "%s=%s", name, value);
 
@@ -38,8 +36,7 @@ m_putenv (char *name, char *value)
            return 0;
        }
 
-    if (!(nep = (char **) malloc ((size_t) ((i + 2) * sizeof(*nep)))))
-       return 1;
+    nep = (char **) mh_xmalloc ((size_t) ((i + 2) * sizeof(*nep)));
 
     for (ep = environ, i = 0; *ep; nep[i++] = *ep++)
        continue;