From: Brian Fraser Date: Thu, 9 May 2013 23:19:33 +0000 (-0300) Subject: gv_fetchpvn_flags: Simplify some warnings code X-Git-Tag: upstream/5.20.0~1927^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e5de6ae775d6886b3c0b1f745e8a1416ac9b1cd;p=platform%2Fupstream%2Fperl.git gv_fetchpvn_flags: Simplify some warnings code This line originally checked isLEXWARN_on and had two different code paths depending on that -- one of which called ckWARN(), which already checks for isLEXWARN_off, so rather than doing duplicate work, we just call ckWARN(). --- diff --git a/gv.c b/gv.c index b0bcd76..c84e569 100644 --- a/gv.c +++ b/gv.c @@ -2125,8 +2125,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, UTF8fARG(is_utf8, name_end-nambeg, nambeg)); gv_init_pvn(gv, stash, name, len, (add & GV_ADDMULTI)|is_utf8); - if ( isIDFIRST_lazy_if(name, is_utf8) - && ! (isLEXWARN_on ? ckWARN(WARN_ONCE) : (PL_dowarn & G_WARN_ON ) ) ) + if ( isIDFIRST_lazy_if(name, is_utf8) && !ckWARN(WARN_ONCE) ) GvMULTI_on(gv) ; /* set up magic where warranted */