From: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date: Fri, 2 Jan 2009 09:00:35 +0000 (+0100)
Subject: Move variable declaration without initialisation at the top
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d15cd8313063e5745ca7fc7b7b5dc3d73def2e68;p=p5sagit%2Fp5-mst-13.2.git

Move variable declaration without initialisation at the top

Plus a comment by Nicholas
---

diff --git a/gv.c b/gv.c
index d64965d..b662563 100644
--- a/gv.c
+++ b/gv.c
@@ -1863,11 +1863,12 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
       else if ( lex_mask && SvPOK(lex_mask) ) {
 	  /* we have an entry in the hints hash, check if method has been
 	   * masked by overloading.pm */
+	  STRLEN len;
 	  const int offset = method / 8;
 	  const int bit    = method % 7;
-	  STRLEN len;
 	  char *pv = SvPV(lex_mask, len);
 
+	  /* Bit set, so this overloading operator is disabled */
 	  if ( (STRLEN)offset <= len && pv[offset] & ( 1 << bit ) )
 	      return NULL;
       }