From 406a8478cd73c5c166783e9d3583b2249e3b7068 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 26 Nov 2022 17:41:06 +1100 Subject: [PATCH] Use break instead of goto --- src/Tk/tkImaging.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Tk/tkImaging.c b/src/Tk/tkImaging.c index e16f33eb085..506bb7008f7 100644 --- a/src/Tk/tkImaging.c +++ b/src/Tk/tkImaging.c @@ -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");