1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-04 02:29:31 +00:00

Cleanup for #796 fix.

This commit is contained in:
laubzega 2020-07-04 00:17:04 -07:00
parent 779461f407
commit 50df5845dc
2 changed files with 6 additions and 5 deletions

View File

@ -178,8 +178,9 @@ SymEntry* ParseScopedSymName (SymFindAction Action)
*/
if (NoScope && (Action & SYM_ALLOC_NEW) == 0) {
Sym = SymFindAny (Scope, &Ident);
if (!Sym) {
Sym = SymFindInChildren(Scope, &Ident);
if (Sym == 0) {
Sym = SymFindInChildren (Scope, &Ident);
}
} else {
/* If we are processing a symbol within an expression, which the
@ -200,7 +201,7 @@ SymEntry* ParseScopedSymName (SymFindAction Action)
/* If still not found, or if in non-const expression, it will just
** get added to the current scope.
*/
if (!Sym) {
if (Sym == 0) {
Sym = SymFind (Scope, &Ident, Action);
}
}

View File

@ -431,9 +431,9 @@ SymEntry* SymFindInChildren (SymTable* Parent, const StrBuf* Name)
if (Scope) {
do {
Sym = SymFind(Scope, Name, SYM_CHECK_ONLY);
Sym = SymFind (Scope, Name, SYM_CHECK_ONLY);
Scope = Scope->Next;
} while (Scope && !Sym);
} while (Sym == 0 && Scope != 0);
}
return Sym;