From: Nicholas Clark Date: Mon, 18 May 2009 10:42:01 +0000 (+0100) Subject: In Perl_mg_dup(), the while loop does the NULL check for us already. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c160a1863eed093c75031c8196f07c0f13df1789;p=p5sagit%2Fp5-mst-13.2.git In Perl_mg_dup(), the while loop does the NULL check for us already. --- diff --git a/sv.c b/sv.c index c21b8ce..0b95142 100644 --- a/sv.c +++ b/sv.c @@ -10510,13 +10510,10 @@ MAGIC * Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *const param) { MAGIC *mgprev = (MAGIC*)NULL; - MAGIC *mgret; + MAGIC *mgret = NULL; PERL_ARGS_ASSERT_MG_DUP; - if (!mg) - return (MAGIC*)NULL; - for (; mg; mg = mg->mg_moremagic) { MAGIC *nmg; Newxz(nmg, 1, MAGIC);