Added ``#include <whoami.h>'' if pdp11 is defined.
[unix-history] / usr / src / usr.bin / mail / vars.c
index 7f07f93..6455a17 100644 (file)
@@ -8,7 +8,7 @@
  * Variable handling stuff.
  */
 
  * Variable handling stuff.
  */
 
-static char *SccsId = "@(#)vars.c      2.2 %G%";
+static char *SccsId = "@(#)vars.c      2.3 %G%";
 
 /*
  * Assign a value to a variable.
 
 /*
  * Assign a value to a variable.
@@ -59,7 +59,8 @@ vcopy(str)
 
        if (equal(str, ""))
                return("");
 
        if (equal(str, ""))
                return("");
-       top = calloc(strlen(str)+1, 1);
+       if ((top = calloc(strlen(str)+1, 1)) == NULL)
+               panic ("Out of memory");
        cp = top;
        cp2 = str;
        while (*cp++ = *cp2++)
        cp = top;
        cp2 = str;
        while (*cp++ = *cp2++)