diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-12-04 00:09:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-12-04 00:09:37 +0000 |
commit | 641e0ebe0a273ddb309de37198c97c9faf59238c (patch) | |
tree | 7ca90bec6b0897b042d332aeddc2387470e4d178 | |
parent | 823bd7d858760d38e0c5b12f6c8a1bfa7088aca6 (diff) |
indent
-rw-r--r-- | usr.bin/error/subr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/error/subr.c b/usr.bin/error/subr.c index aa49356c6a8..ea88fe1bb23 100644 --- a/usr.bin/error/subr.c +++ b/usr.bin/error/subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr.c,v 1.4 1998/11/16 06:22:28 deraadt Exp $ */ +/* $OpenBSD: subr.c,v 1.5 1999/12/04 00:09:36 deraadt Exp $ */ /* $NetBSD: subr.c,v 1.4 1995/09/10 15:55:15 christos Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: subr.c,v 1.4 1998/11/16 06:22:28 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: subr.c,v 1.5 1999/12/04 00:09:36 deraadt Exp $"; #endif /* not lint */ #include <stdio.h> @@ -94,6 +94,7 @@ char *Calloc(nelements, size) int size; { char *back; + if ( (back = (char *)calloc(nelements, size)) == NULL) { error("Ran out of memory.\n"); exit(1); @@ -105,8 +106,9 @@ char *strsave(instring) char *instring; { char *outstring; + (void)strcpy(outstring = (char *)Calloc(1, strlen(instring) + 1), - instring); + instring); return(outstring); } /* |