From: Karel Zak Date: Wed, 24 Jul 2024 07:13:08 +0000 (+0200) Subject: agetty: fix ambiguous ‘else’ [-Werror=dangling-else] X-Git-Tag: v2.42-start~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a14f8d1727035a68b1fef167499930e09a2b234;p=thirdparty%2Futil-linux.git agetty: fix ambiguous ‘else’ [-Werror=dangling-else] Signed-off-by: Karel Zak --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 500e0992f..7a1da5ee5 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -2288,7 +2288,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t default: if ((size_t)(bp - logname) >= sizeof(logname) - 1) log_err(_("%s: input overrun"), op->tty); - if ((tp->c_lflag & ECHO) == 0) + if ((tp->c_lflag & ECHO) == 0) { /* Visualize escape sequence instead of its execution */ if (ascval == CTL('[')) /* Ideally it should be "\xe2\x90\x9b" @@ -2297,6 +2297,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t write_all(1, "^[", 2); else write_all(1, &c, 1); /* echo the character */ + } *bp++ = ascval; /* and store it */ break; }