curses: fix unused label 'bail'

when SELECTSAVED isn't defined by using a goto for it even when
an 'if' was easily avoiding the need for that.
This commit is contained in:
PatR
2021-01-08 13:57:52 -08:00
parent 2d1150bd0a
commit 05c7a21756
+5 -4
View File
@@ -254,10 +254,11 @@ curses_askname()
curses_line_input_dialog("Who are you?", g.plname, PL_NSIZ); curses_line_input_dialog("Who are you?", g.plname, PL_NSIZ);
(void) mungspaces(g.plname); (void) mungspaces(g.plname);
if (g.plname[0] && g.plname[0] != '\033') { if (!g.plname[0] || g.plname[0] == '\033')
iflags.renameallowed = TRUE; /* tty uses this, we don't [yet?] */ goto bail;
return;
} iflags.renameallowed = TRUE; /* tty uses this, we don't [yet?] */
return;
bail: bail:
/* message is delivered via raw_print() */ /* message is delivered via raw_print() */