diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2006-04-23 06:47:04 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-04-24 08:01:32 +0000 |
commit | 9f616d01cdd2df6cb0ab278ef65f90a68ac10150 (patch) | |
tree | be1f5fb27c2e50c89bcc807f082c9021d6aeffd6 /gv.c | |
parent | c395bd6cbc645e80f929b5b4e285b43aa4366851 (diff) | |
download | perl-9f616d01cdd2df6cb0ab278ef65f90a68ac10150.tar.gz |
Ensure GvNAME doesn't return NULL
First patch from :
Subject: Re: [PATCH] cleanup 212 warnings emitted by gcc-4.2
Message-ID: <20060423044704.6a383ee8@r2d2>
p4raw-id: //depot/perl@27944
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2117,6 +2117,7 @@ Perl_gv_name_set(pTHX_ GV *gv, const char *name, U32 len, U32 flags) dVAR; U32 hash; + assert(name); PERL_UNUSED_ARG(flags); if (len > I32_MAX) @@ -2127,7 +2128,7 @@ Perl_gv_name_set(pTHX_ GV *gv, const char *name, U32 len, U32 flags) } PERL_HASH(hash, name, len); - GvNAME_HEK(gv) = name ? share_hek(name, len, hash) : 0; + GvNAME_HEK(gv) = share_hek(name, len, hash); } /* |