Skip to content

Commit

Permalink
Merge pull request #1 from radarhere/patch-1
Browse files Browse the repository at this point in the history
Use break instead of goto
  • Loading branch information
javidcf committed Nov 26, 2022
2 parents 4a36d9d + 406a847 commit cc448f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Tk/tkImaging.c
Expand Up @@ -347,22 +347,21 @@ load_tkinter_funcs(void) {
if (!found_tcl) {
found_tcl = get_tcl(hMods[i]);
if (found_tcl == -1) {
goto exit;
break;
}
}
if (!found_tk) {
found_tk = get_tk(hMods[i]);
if (found_tk == -1) {
goto exit;
break;
}
}
if (found_tcl && found_tk) {
goto exit;
break;
}
}
}

exit:
free(hMods);
if (found_tcl != 1) {
PyErr_SetString(PyExc_RuntimeError, "Could not find Tcl routines");
Expand Down

0 comments on commit cc448f2

Please sign in to comment.