From ffd6e1e4e04e6bf12ec6112c08d097d2edc1e658 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 28 Feb 2012 11:45:16 -0500 Subject: sulogin: use size_t for iterator to avoid cast Signed-off-by: Dave Reisner --- login-utils/sulogin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'login-utils/sulogin.c') diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 811018e3b..c9e376c43 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -292,7 +292,7 @@ static char *getpasswd(char *crypted) struct termios old, tty; static char pass[128]; char *ret = pass; - int i; + size_t i; if (crypted[0]) printf("Give root password for maintenance\n"); @@ -318,7 +318,7 @@ static char *getpasswd(char *crypted) if (read(0, pass, sizeof(pass) - 1) <= 0) ret = NULL; else { - for (i = 0; i < (int)sizeof(pass) && pass[i]; i++) + for (i = 0; i < sizeof(pass) && pass[i]; i++) if (pass[i] == '\r' || pass[i] == '\n') { pass[i] = 0; break; -- cgit v1.2.3-55-g7522