1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Get rid of the shell table sentinel. It isn't needed anymore because

JobMatchShell returns NULL when no shell name matches since revision 1.51.
This commit is contained in:
Hartmut Brandt 2004-11-22 15:45:57 +00:00
parent 05127e036e
commit d96b4f0130
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137991

View File

@ -205,15 +205,6 @@ static Shell shells[] = {
TRUE, "set -e", "set +e",
"v", "e",
},
/*
* UNKNOWN.
*/
{
(char *) 0,
FALSE, (char *) 0, (char *) 0, (char *) 0, 0,
FALSE, (char *) 0, (char *) 0,
(char *) 0, (char *) 0,
}
};
static Shell *commandShell = &shells[DEFSHELL];/* this is the shell to
* which we pass all
@ -2345,7 +2336,7 @@ JobMatchShell(char *name)
match = NULL;
for (sh = shells; sh->name != NULL; sh++) {
for (sh = shells; sh < shells + sizeof(shells) / sizeof(shells[0]); sh++) {
for (cp1 = eoname - strlen(sh->name), cp2 = sh->name;
*cp1 != '\0' && *cp1 == *cp2;
cp1++, cp2++) {