From: Alejandro Colomar Date: Fri, 24 Oct 2025 10:03:41 +0000 (+0200) Subject: lib/utmp.c: is_my_tty(): Rename local variable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9327afaff8e8cb6e28561b11848cf7eb99028a70;p=thirdparty%2Fshadow.git lib/utmp.c: is_my_tty(): Rename local variable This name makes the function definition more readable. Reviewed-by: Serge Hallyn Signed-off-by: Alejandro Colomar --- diff --git a/lib/utmp.c b/lib/utmp.c index edd931b7a..2c98293f8 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -52,20 +52,20 @@ static bool is_my_tty(const char tty[UTX_LINESIZE]) { char full_tty[STRLEN("/dev/") + UTX_LINESIZE + 1]; - const char *tmptty; + const char *my_tty; stpcpy(full_tty, ""); if (tty[0] != '/') strcpy (full_tty, "/dev/"); strncat(full_tty, tty, UTX_LINESIZE); - tmptty = ttyname(STDIN_FILENO); - if (NULL != tmptty) + my_tty = ttyname(STDIN_FILENO); + if (NULL != my_tty) (void) puts (_("Unable to determine your tty name.")); exit (EXIT_FAILURE); } - return streq(full_tty, tmptty); + return streq(full_tty, my_tty); }