svn commit: r295868 - head/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Sun Feb 21 20:58:25 UTC 2016
Author: jilles
Date: Sun Feb 21 20:58:24 2016
New Revision: 295868
URL: https://svnweb.freebsd.org/changeset/base/295868
Log:
sh: Don't hash alias name when there are no aliases.
Modified:
head/bin/sh/alias.c
Modified: head/bin/sh/alias.c
==============================================================================
--- head/bin/sh/alias.c Sun Feb 21 18:58:05 2016 (r295867)
+++ head/bin/sh/alias.c Sun Feb 21 20:58:24 2016 (r295868)
@@ -144,9 +144,11 @@ rmaliases(void)
struct alias *
lookupalias(const char *name, int check)
{
- struct alias *ap = *hashalias(name);
+ struct alias *ap;
- for (; ap; ap = ap->next) {
+ if (aliases == 0)
+ return (NULL);
+ for (ap = *hashalias(name); ap; ap = ap->next) {
if (equal(name, ap->name)) {
if (check && (ap->flag & ALIASINUSE))
return (NULL);
More information about the svn-src-all
mailing list