sh: Don't hash alias name when there are no aliases.
This commit is contained in:
parent
8be85b352b
commit
2ece338651
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user