summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-01-15 07:57:47 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-01-15 07:57:47 +0000
commite8ccc7c38f0fabc1c4f0f52801ed3bc83792fef9 (patch)
treed38de58f459f30e3dc9ec029e75406dec1169038 /util.c
parent853f974d4a8f91c1b9bc4582e389ac91cf12c8c0 (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
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);