From: Nick Ing-Simmons Date: Tue, 15 Jan 2002 07:57:47 +0000 (+0000) Subject: const-ness fix in savepv's passing of NULL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=965155cb95a9be50d5ff126b516ea1fda1cb74ee;p=p5sagit%2Fp5-mst-13.2.git const-ness fix in savepv's passing of NULL p4raw-id: //depot/perlio@14268 --- diff --git a/util.c b/util.c index 83b9026..72c85cd 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);