From 01bd93ce1caac540b6a39f11c2ac0a8bc11e329b Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Tue, 14 Feb 2012 10:11:45 +0000 Subject: [PATCH] Remove unnecessary cast --- usr.bin/chpass/util.c | 4 ++-- usr.bin/login/login_fbtab.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c index 07d96e227a96..baf160e8762e 100644 --- a/usr.bin/chpass/util.c +++ b/usr.bin/chpass/util.c @@ -110,10 +110,10 @@ atot(char *p, time_t *store) } } } - if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t)) + if (!(t = strtok(NULL, " \t,")) || !isdigit(*t)) goto bad; day = atoi(t); - if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t)) + if (!(t = strtok(NULL, " \t,")) || !isdigit(*t)) goto bad; year = atoi(t); if (day < 1 || day > 31 || month < 1 || month > 12) diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c index ad64e4fad948..f642ea7e7f5b 100644 --- a/usr.bin/login/login_fbtab.c +++ b/usr.bin/login/login_fbtab.c @@ -100,17 +100,17 @@ login_fbtab(char *tty, uid_t uid, gid_t gid) if ((cp = devname = strtok(buf, WSPACE)) == 0) continue; /* empty or comment */ if (strncmp(devname, _PATH_DEV, sizeof _PATH_DEV - 1) != 0 - || (cp = strtok((char *) 0, WSPACE)) == 0 + || (cp = strtok(NULL, WSPACE)) == 0 || *cp != '0' || sscanf(cp, "%o", &prot) == 0 || prot == 0 || (prot & 0777) != prot - || (cp = strtok((char *) 0, WSPACE)) == 0) { + || (cp = strtok(NULL, WSPACE)) == 0) { syslog(LOG_ERR, "%s: bad entry: %s", table, cp ? cp : "(null)"); continue; } if (strcmp(devname + 5, tty) == 0) { - for (cp = strtok(cp, ":"); cp; cp = strtok((char *) 0, ":")) { + for (cp = strtok(cp, ":"); cp; cp = strtok(NULL, ":")) { login_protect(table, cp, prot, uid, gid); } }