From owner-svn-src-all@FreeBSD.ORG Tue Feb 14 10:11:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0183106564A; Tue, 14 Feb 2012 10:11:46 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83A018FC1F; Tue, 14 Feb 2012 10:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1EABk5Q091895; Tue, 14 Feb 2012 10:11:46 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1EABk4W091892; Tue, 14 Feb 2012 10:11:46 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201202141011.q1EABk4W091892@svn.freebsd.org> From: Kevin Lo Date: Tue, 14 Feb 2012 10:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231651 - in head/usr.bin: chpass login X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2012 10:11:47 -0000 Author: kevlo Date: Tue Feb 14 10:11:45 2012 New Revision: 231651 URL: http://svn.freebsd.org/changeset/base/231651 Log: Remove unnecessary cast Modified: head/usr.bin/chpass/util.c head/usr.bin/login/login_fbtab.c Modified: head/usr.bin/chpass/util.c ============================================================================== --- head/usr.bin/chpass/util.c Tue Feb 14 09:42:02 2012 (r231650) +++ head/usr.bin/chpass/util.c Tue Feb 14 10:11:45 2012 (r231651) @@ -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) Modified: head/usr.bin/login/login_fbtab.c ============================================================================== --- head/usr.bin/login/login_fbtab.c Tue Feb 14 09:42:02 2012 (r231650) +++ head/usr.bin/login/login_fbtab.c Tue Feb 14 10:11:45 2012 (r231651) @@ -100,17 +100,17 @@ login_fbtab(char *tty, uid_t uid, gid_t 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); } }