From: Dave Reisner Date: Tue, 28 Feb 2012 16:45:16 +0000 (-0500) Subject: sulogin: use size_t for iterator to avoid cast X-Git-Tag: v2.22-rc1~694 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffd6e1e4e04e6bf12ec6112c08d097d2edc1e658;p=thirdparty%2Futil-linux.git sulogin: use size_t for iterator to avoid cast Signed-off-by: Dave Reisner --- diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 811018e3b0..c9e376c43e 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;