From 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 Mon Sep 17 00:00:00 2001 From: svn2git Date: Fri, 1 Jul 1994 00:00:00 -0800 Subject: Release FreeBSD 1.1.5.1 This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs. --- lib/libmalloc/strsave.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/libmalloc/strsave.c (limited to 'lib/libmalloc/strsave.c') diff --git a/lib/libmalloc/strsave.c b/lib/libmalloc/strsave.c new file mode 100644 index 000000000000..79fe856c4e45 --- /dev/null +++ b/lib/libmalloc/strsave.c @@ -0,0 +1,21 @@ +/* Author: Mark Moraes */ + +/*LINTLIBRARY*/ + +#include "defs.h" + +RCSID("$Id: strsave.c,v 1.1 1994/03/06 22:59:55 nate Exp $") + +/* + * makes a copy of a null terminated string in malloc'ed storage. Dies + * if enough memory isn't available or there is a malloc error + */ +char * +strsave(s) +const char *s; +{ + if (s) + return(strcpy(emalloc((size_t) (strlen(s)+1)),s)); + else + return((char *) NULL); +} -- cgit v1.2.3