From 7e6f029448ed43212154e759df8dc12ee1fbecd1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 7 Aug 2017 09:48:51 +0200 Subject: 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 --- term-utils/agetty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'term-utils/agetty.c') diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 3c3764b8e..956e8af97 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); } /* -- cgit v1.2.3-55-g7522