From: Nicholas Clark Date: Tue, 7 Dec 2004 23:39:46 +0000 (+0000) Subject: Avoid getting the stash name twice (at least visually, if not also X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7a91edcc80cb05776e70aedec8ffa365b6d6806;p=p5sagit%2Fp5-mst-13.2.git Avoid getting the stash name twice (at least visually, if not also in the generated code) p4raw-id: //depot/perl@23626 --- diff --git a/sv.c b/sv.c index 82b844a..7687921 100644 --- a/sv.c +++ b/sv.c @@ -8404,10 +8404,8 @@ char * Perl_sv_reftype(pTHX_ SV *sv, int ob) { if (ob && SvOBJECT(sv)) { - if (HvNAME(SvSTASH(sv))) - return HvNAME(SvSTASH(sv)); - else - return "__ANON__"; + char *name = HvNAME(SvSTASH(sv)); + return name ? name : "__ANON__"; } else { switch (SvTYPE(sv)) {