diff options
| author | itojun <itojun@NetBSD.org> | 2003-07-14 09:41:27 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 2003-07-14 09:41:27 +0000 |
| commit | d91f80a70234aa694dea2bc985e8f4e248aa2d6b (patch) | |
| tree | 59a103e4a8fa0a9f08f0d583ea4e0f3c77fc7008 /usr.bin/error | |
| parent | fe182b3802b9471d5906177077114d7c1fba30b0 (diff) | |
the function is equivalent to strdup.
Diffstat (limited to 'usr.bin/error')
| -rw-r--r-- | usr.bin/error/subr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/error/subr.c b/usr.bin/error/subr.c index 79e7ec8ccdd..796915ffb58 100644 --- a/usr.bin/error/subr.c +++ b/usr.bin/error/subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: subr.c,v 1.11 2002/05/26 22:41:21 wiz Exp $ */ +/* $NetBSD: subr.c,v 1.12 2003/07/14 09:41:27 itojun Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: subr.c,v 1.11 2002/05/26 22:41:21 wiz Exp $"); +__RCSID("$NetBSD: subr.c,v 1.12 2003/07/14 09:41:27 itojun Exp $"); #endif /* not lint */ #include <ctype.h> @@ -86,8 +86,8 @@ char * strsave(char *instring) { char *outstring; - (void)strcpy(outstring = (char *)Calloc(1, strlen(instring) + 1), - instring); + + outstring = strdup(instring); return(outstring); } |
