From d91f80a70234aa694dea2bc985e8f4e248aa2d6b Mon Sep 17 00:00:00 2001 From: itojun Date: Mon, 14 Jul 2003 09:41:27 +0000 Subject: [PATCH] the function is equivalent to strdup. --- usr.bin/error/subr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/error/subr.c b/usr.bin/error/subr.c index 79e7ec8ccdd3..796915ffb58c 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 @@ -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); }