diff --git a/lib/commonio.c b/lib/commonio.c index ac0c6321e..ccc0cbd5f 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -655,9 +655,7 @@ int commonio_open (struct commonio_db *db, int mode) goto cleanup_errno; len = strlen (buf); - if (db->ops->fgets (buf + len, - (int) (buflen - len), - db->fp) == NULL) { + if (db->ops->fgets(buf + len, buflen - len, db->fp) == NULL) { goto cleanup_buf; } } diff --git a/lib/gshadow.c b/lib/gshadow.c index e66704a2f..e1f49ba6d 100644 --- a/lib/gshadow.c +++ b/lib/gshadow.c @@ -160,9 +160,7 @@ sgetsgent(const char *string) buflen *= 2; len = strlen (buf); - if (fgetsx (&buf[len], - (int) (buflen - len), - fp) != &buf[len]) { + if (fgetsx(&buf[len], buflen - len, fp) != &buf[len]) { return NULL; } } diff --git a/lib/setupenv.c b/lib/setupenv.c index d65e2fc19..211b7bdb0 100644 --- a/lib/setupenv.c +++ b/lib/setupenv.c @@ -54,7 +54,7 @@ static void read_env_file (const char *filename) if (NULL == fp) { return; } - while (fgets(buf, (int) sizeof(buf), fp) == buf) { + while (fgets(buf, sizeof(buf), fp) == buf) { if (stpsep(buf, "\n") == NULL) break; diff --git a/src/chgpasswd.c b/src/chgpasswd.c index a85e47a37..bfb2c7719 100644 --- a/src/chgpasswd.c +++ b/src/chgpasswd.c @@ -460,7 +460,7 @@ int main (int argc, char **argv) * group entry for each group will be looked up in the appropriate * file (gshadow or group) and the password changed. */ - while (fgets(buf, (int) sizeof(buf), stdin) != NULL) { + while (fgets(buf, sizeof(buf), stdin) != NULL) { line++; if (stpsep(buf, "\n") == NULL) { fprintf (stderr, _("%s: line %d: line too long\n"),