From 2a98b2f055b7d5cd3a6982784458233236a7b3e8 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 13 Jun 2022 21:18:22 +0200 Subject: [PATCH] Minor, fix shadowing of variable in outer scope Signed-off-by: Joachim Wiberg --- src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exec.c b/src/exec.c index 59d911ac..7e80fb89 100644 --- a/src/exec.c +++ b/src/exec.c @@ -329,7 +329,7 @@ static int activate_console(int noclear, int nowait) static const char clr[] = "\r\e[K"; static const char cup[] = "\e[A"; struct termios orig; - char c; + char ch; int rc; if (nowait || rescue) @@ -351,7 +351,7 @@ static int activate_console(int noclear, int nowait) dprint(STDERR_FILENO, clr, strlen(clr)); dprint(STDERR_FILENO, msg, strlen(msg)); - while ((rc = read(STDIN_FILENO, &c, 1)) > 0 && c != '\r' && c != '\n') + while ((rc = read(STDIN_FILENO, &ch, 1)) > 0 && ch != '\r' && ch != '\n') continue; /* On any error (likely EINTR), we avoid starting getty */