mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sh: Don't hash alias name when there are no aliases.
This commit is contained in:
parent
8be85b352b
commit
2ece338651
1 changed files with 4 additions and 2 deletions
|
|
@ -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 a new issue