From 965155cb95a9be50d5ff126b516ea1fda1cb74ee Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Tue, 15 Jan 2002 07:57:47 +0000 Subject: const-ness fix in savepv's passing of NULL p4raw-id: //depot/perlio@14268 --- util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 83b9026d8d..72c85cdc76 100644 --- a/util.c +++ b/util.c @@ -891,11 +891,11 @@ Copy a string to a safe spot. This does not use an SV. char * Perl_savepv(pTHX_ const char *sv) { - register char *newaddr = sv; + register char *newaddr = Nullch; if (sv) { New(902,newaddr,strlen(sv)+1,char); (void)strcpy(newaddr,sv); - } + } return newaddr; } @@ -932,7 +932,7 @@ This does not use an SV. char * Perl_savesharedpv(pTHX_ const char *sv) { - register char *newaddr = sv; + register char *newaddr = Nullch; if (sv) { newaddr = PerlMemShared_malloc(strlen(sv)+1); (void)strcpy(newaddr,sv); -- cgit v1.2.1