Skip to content

Commit cc448f2

Browse files
authored
Merge pull request #1 from radarhere/patch-1
Use break instead of goto
2 parents 4a36d9d + 406a847 commit cc448f2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Tk/tkImaging.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,22 +347,21 @@ load_tkinter_funcs(void) {
347347
if (!found_tcl) {
348348
found_tcl = get_tcl(hMods[i]);
349349
if (found_tcl == -1) {
350-
goto exit;
350+
break;
351351
}
352352
}
353353
if (!found_tk) {
354354
found_tk = get_tk(hMods[i]);
355355
if (found_tk == -1) {
356-
goto exit;
356+
break;
357357
}
358358
}
359359
if (found_tcl && found_tk) {
360-
goto exit;
360+
break;
361361
}
362362
}
363363
}
364364

365-
exit:
366365
free(hMods);
367366
if (found_tcl != 1) {
368367
PyErr_SetString(PyExc_RuntimeError, "Could not find Tcl routines");

0 commit comments

Comments
 (0)