diff options
author | Dave Reisner | 2012-02-28 17:45:16 +0100 |
---|---|---|
committer | Karel Zak | 2012-03-12 11:17:36 +0100 |
commit | ffd6e1e4e04e6bf12ec6112c08d097d2edc1e658 (patch) | |
tree | e6896b7eab35df93e335ffd6300996bd2a5a24cd /login-utils/sulogin.c | |
parent | sulogin: remove USE_ONELINE and SANE_TIO defines (diff) | |
download | kernel-qcow2-util-linux-ffd6e1e4e04e6bf12ec6112c08d097d2edc1e658.tar.gz kernel-qcow2-util-linux-ffd6e1e4e04e6bf12ec6112c08d097d2edc1e658.tar.xz kernel-qcow2-util-linux-ffd6e1e4e04e6bf12ec6112c08d097d2edc1e658.zip |
sulogin: use size_t for iterator to avoid cast
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'login-utils/sulogin.c')
-rw-r--r-- | login-utils/sulogin.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |