diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-01-15 07:57:47 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-01-15 07:57:47 +0000 |
commit | e8ccc7c38f0fabc1c4f0f52801ed3bc83792fef9 (patch) | |
tree | d38de58f459f30e3dc9ec029e75406dec1169038 /util.c | |
parent | 853f974d4a8f91c1b9bc4582e389ac91cf12c8c0 (diff) | |
download | perl-e8ccc7c38f0fabc1c4f0f52801ed3bc83792fef9.tar.gz |
const-ness fix in savepv's passing of NULL
p4raw-id: //depot/perlio@14268
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |