Small code tidy up in gv_fullname4
Nicholas Clark [Fri, 3 Dec 2004 18:56:31 +0000 (18:56 +0000)]
p4raw-id: //depot/perl@23605

gv.c

diff --git a/gv.c b/gv.c
index 5ea5141..64acb37 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1092,13 +1092,12 @@ Perl_gv_fullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
     }
     sv_setpv(sv, prefix ? prefix : "");
     
-    if (!HvNAME(hv))
+    name = HvNAME(hv);
+    if (!name)
        name = "__ANON__";
-    else 
-       name = HvNAME(hv);
+       
     if (keepmain || strNE(name, "main")) {
-       sv_catpv(sv,name);
-       sv_catpvn(sv,"::", 2);
+       Perl_sv_catpvf(aTHX_ sv,"%s::", name);
     }
     sv_catpvn(sv,GvNAME(gv),GvNAMELEN(gv));
 }