From owner-svn-src-all@FreeBSD.ORG Sat Feb 5 14:08:51 2011 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 D6A5C106566B; Sat, 5 Feb 2011 14:08:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB3CE8FC08; Sat, 5 Feb 2011 14:08:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p15E8pG8029954; Sat, 5 Feb 2011 14:08:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p15E8p8R029950; Sat, 5 Feb 2011 14:08:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201102051408.p15E8p8R029950@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Feb 2011 14:08:51 +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: r218324 - head/bin/sh 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: Sat, 05 Feb 2011 14:08:51 -0000 Author: jilles Date: Sat Feb 5 14:08:51 2011 New Revision: 218324 URL: http://svn.freebsd.org/changeset/base/218324 Log: sh: Remove clearcmdentry()'s now unused argument. Modified: head/bin/sh/eval.c head/bin/sh/exec.c head/bin/sh/exec.h Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Feb 5 14:01:46 2011 (r218323) +++ head/bin/sh/eval.c Sat Feb 5 14:08:51 2011 (r218324) @@ -812,7 +812,7 @@ evalcommand(union node *cmd, int flags, * bookinging effort, since most such runs add * directories in front of the new PATH. */ - clearcmdentry(0); + clearcmdentry(); do_clearcmdentry = 1; } @@ -854,7 +854,7 @@ evalcommand(union node *cmd, int flags, argc -= 2; } path = _PATH_STDPATH; - clearcmdentry(0); + clearcmdentry(); do_clearcmdentry = 1; } else if (!strcmp(argv[1], "--")) { if (argc == 2) @@ -1061,7 +1061,7 @@ out: if (lastarg) setvar("_", lastarg, 0); if (do_clearcmdentry) - clearcmdentry(0); + clearcmdentry(); popstackmark(&smark); } Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sat Feb 5 14:01:46 2011 (r218323) +++ head/bin/sh/exec.c Sat Feb 5 14:08:51 2011 (r218324) @@ -234,7 +234,7 @@ hashcmd(int argc __unused, char **argv _ verbose = 0; while ((c = nextopt("rv")) != '\0') { if (c == 'r') { - clearcmdentry(0); + clearcmdentry(); } else if (c == 'v') { verbose++; } @@ -494,7 +494,7 @@ hashcd(void) void changepath(const char *newval) { - clearcmdentry(0); + clearcmdentry(); } @@ -504,7 +504,7 @@ changepath(const char *newval) */ void -clearcmdentry(int firstchange) +clearcmdentry(void) { struct tblentry **tblp; struct tblentry **pp; @@ -514,8 +514,7 @@ clearcmdentry(int firstchange) for (tblp = cmdtable ; tblp < &cmdtable[CMDTABLESIZE] ; tblp++) { pp = tblp; while ((cmdp = *pp) != NULL) { - if ((cmdp->cmdtype == CMDNORMAL && - cmdp->param.index >= firstchange)) { + if (cmdp->cmdtype == CMDNORMAL) { *pp = cmdp->next; ckfree(cmdp); } else { @@ -660,7 +659,7 @@ typecmd_impl(int argc, char **argv, int int error1 = 0; if (path != pathval()) - clearcmdentry(0); + clearcmdentry(); for (i = 1; i < argc; i++) { /* First look at the keywords */ @@ -756,7 +755,7 @@ typecmd_impl(int argc, char **argv, int } if (path != pathval()) - clearcmdentry(0); + clearcmdentry(); return error1; } Modified: head/bin/sh/exec.h ============================================================================== --- head/bin/sh/exec.h Sat Feb 5 14:01:46 2011 (r218323) +++ head/bin/sh/exec.h Sat Feb 5 14:08:51 2011 (r218324) @@ -76,4 +76,4 @@ void defun(const char *, union node *); int unsetfunc(const char *); int typecmd_impl(int, char **, int, const char *); int typecmd(int, char **); -void clearcmdentry(int); +void clearcmdentry(void);