Skip to content

Commit 1449247

Browse files
review: goto error at the end of the function
1 parent 7ba2557 commit 1449247

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Modules/readline.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,8 +1406,7 @@ setup_readline(readlinestate *mod_state)
14061406
/* All nonalphanums except '.' */
14071407

14081408
if (!completer_word_break_characters) {
1409-
RESTORE_LOCALE(saved_locale)
1410-
return -1;
1409+
goto error;
14111410
}
14121411
#ifdef WITH_EDITLINE
14131412
// libedit uses rl_basic_word_break_characters instead of
@@ -1452,6 +1451,10 @@ setup_readline(readlinestate *mod_state)
14521451

14531452
RESTORE_LOCALE(saved_locale)
14541453
return 0;
1454+
1455+
error:
1456+
RESTORE_LOCALE(saved_locale)
1457+
return -1;
14551458
}
14561459

14571460
/* Wrapper around GNU readline that handles signals differently. */

0 commit comments

Comments
 (0)