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 | 965155cb95a9be50d5ff126b516ea1fda1cb74ee (patch) | |
tree | d38de58f459f30e3dc9ec029e75406dec1169038 /util.c | |
parent | 00ca71c18f4e3a59b9a40525cbef41f099448920 (diff) | |
download | perl-965155cb95a9be50d5ff126b516ea1fda1cb74ee.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); |