Skip to content

Commit cbce808

Browse files
committed
gv_magicalize: remove three goto's, and dest label
The previous commit moved a block, so two of these aren't necessary, and the final one can be removed by adding an else
1 parent addc60f commit cbce808

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

gv.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,11 +2100,8 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
21002100
if (strBEGINs(stashname, "CORE"))
21012101
S_maybe_add_coresub(aTHX_ 0, gv, name, len);
21022102
}
2103-
2104-
goto ret;
21052103
}
2106-
2107-
if (stash != PL_defstash) { /* not the main stash */
2104+
else if (stash != PL_defstash) { /* not the main stash */
21082105
/* We only have to check for a few names here: a, b, EXPORT, ISA
21092106
and VERSION. All the others apply only to the main stash or to
21102107
CORE (which is checked right after this). */
@@ -2140,7 +2137,6 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
21402137
default:
21412138
goto try_core;
21422139
}
2143-
goto ret;
21442140
}
21452141
else if (len > 1) {
21462142
switch (*name) {
@@ -2298,7 +2294,7 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
22982294
this test */
22992295
UV uv;
23002296
if (!grok_atoUV(name, &uv, NULL) || uv > I32_MAX)
2301-
goto ret;
2297+
break;
23022298
/* XXX why are we using a SSize_t? */
23032299
paren = (SSize_t)(I32)uv;
23042300
goto storeparen;
@@ -2468,7 +2464,6 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
24682464
}
24692465
}
24702466

2471-
ret:
24722467
/* Return true if we actually did something. */
24732468
return GvAV(gv) || GvHV(gv) || GvIO(gv) || GvCV(gv)
24742469
|| ( GvSV(gv) && (

0 commit comments

Comments
 (0)