refactor(option.c): remove goto

This commit is contained in:
Lewis Russell
2023-01-25 15:22:31 +00:00
parent a13e97ece5
commit ef85238fde

View File

@@ -1414,9 +1414,7 @@ int do_set(char *arg, int opt_flags)
if (*arg == NUL) {
showoptions(false, opt_flags);
did_show = true;
goto theend;
}
} else {
while (*arg != NUL) { // loop to process all options
if (strncmp(arg, "all", 3) == 0 && !ASCII_ISALPHA(arg[3])
&& !(opt_flags & OPT_MODELINE)) {
@@ -1481,8 +1479,8 @@ int do_set(char *arg, int opt_flags)
arg = skipwhite(arg);
}
}
theend:
if (silent_mode && did_show) {
// After displaying option values in silent mode.
silent_mode = false;