diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-13 07:22:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-13 07:22:54 (GMT) |
commit | e848623b798a03f757e16c34b5e3610f37ae633d (patch) | |
tree | 9e73b9f58f982771339205ab51b650e236dba3b1 /generic/tkMenu.c | |
parent | c503b4df884723fb51b3e458c0baf1ac844468e3 (diff) | |
download | tk-e848623b798a03f757e16c34b5e3610f37ae633d.zip tk-e848623b798a03f757e16c34b5e3610f37ae633d.tar.gz tk-e848623b798a03f757e16c34b5e3610f37ae633d.tar.bz2 |
Minor simplification
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r-- | generic/tkMenu.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 6de8258..1705722 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -2169,29 +2169,29 @@ GetMenuIndex( if ((string[0] == 'a') && (strcmp(string, "active") == 0)) { *indexPtr = menuPtr->active; - goto success; + return TCL_OK; } if ((string[0] == 'l') && (strcmp(string, "last") == 0)) { *indexPtr = menuPtr->numEntries - ((lastOK) ? 0 : 1); - goto success; + return TCL_OK; } if (string[0] == 0) { *indexPtr = TCL_INDEX_NONE; - goto success; + return TCL_OK; } #if !defined(TK_NO_DEPRECATED) && TK_MAJOR_VERSION < 9 if ((string[0] == 'n') && (strcmp(string, "none") == 0)) { *indexPtr = TCL_INDEX_NONE; - goto success; + return TCL_OK; } #endif if (string[0] == '@') { if (GetIndexFromCoords(interp, menuPtr, string, indexPtr) == TCL_OK) { - goto success; + return TCL_OK; } } @@ -2208,7 +2208,7 @@ GetMenuIndex( if ((label != NULL) && (Tcl_StringCaseMatch(label, string, 0))) { *indexPtr = i; - goto success; + return TCL_OK; } } @@ -2216,9 +2216,6 @@ GetMenuIndex( "bad menu entry index \"%s\"", string)); Tcl_SetErrorCode(interp, "TK", "MENU", "INDEX", NULL); return TCL_ERROR; - - success: - return TCL_OK; } /* |