From: Karel Zak Date: Mon, 7 Aug 2017 07:48:51 +0000 (+0200) Subject: agetty: keep returns in main() X-Git-Tag: v2.31-rc1~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e6f029448ed43212154e759df8dc12ee1fbecd1;p=thirdparty%2Futil-linux.git agetty: keep returns in main() Don't use list_speeds() as non-return function, it seems better to keep main() code consistent. Signed-off-by: Karel Zak --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 3c3764b8ed..956e8af97e 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -298,7 +298,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op); static void termio_init(struct options *op, struct termios *tp); static void reset_vc (const struct options *op, struct termios *tp); static void auto_baud(struct termios *tp); -static void list_speeds(void) __attribute__((__noreturn__)); +static void list_speeds(void); static void output_special_char (unsigned char c, struct options *op, struct termios *tp, FILE *fp); static void do_prompt(struct options *op, struct termios *tp); @@ -833,6 +833,7 @@ static void parse_args(int argc, char **argv, struct options *op) exit(EXIT_SUCCESS); case LIST_SPEEDS_OPTION: list_speeds(); + exit(EXIT_SUCCESS); case VERSION_OPTION: output_version(); exit(EXIT_SUCCESS); @@ -2130,13 +2131,12 @@ static void __attribute__((__noreturn__)) usage(void) exit(EXIT_SUCCESS); } -static void __attribute__((__noreturn__)) list_speeds(void) +static void list_speeds(void) { const struct Speedtab *sp; for (sp = speedtab; sp->speed; sp++) printf("%10ld\n", sp->speed); - exit(EXIT_SUCCESS); } /*