mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix two code style errors
This commit is contained in:
@@ -547,28 +547,24 @@ void sym_AddReloc(char const *tzSym)
|
|||||||
pScope->pScope : pScope;
|
pScope->pScope : pScope;
|
||||||
uint32_t parentLen = localPtr - tzSym;
|
uint32_t parentLen = localPtr - tzSym;
|
||||||
|
|
||||||
if (strchr(localPtr + 1, '.') != NULL) {
|
if (strchr(localPtr + 1, '.') != NULL)
|
||||||
fatalerror("'%s' is a nonsensical reference to a nested local symbol",
|
fatalerror("'%s' is a nonsensical reference to a nested local symbol",
|
||||||
tzSym);
|
tzSym);
|
||||||
} else if (strlen(parent->tzName) != parentLen
|
else if (strlen(parent->tzName) != parentLen
|
||||||
|| strncmp(tzSym, parent->tzName, parentLen) != 0) {
|
|| strncmp(tzSym, parent->tzName, parentLen) != 0)
|
||||||
yyerror("Not currently in the scope of '%.*s'",
|
yyerror("Not currently in the scope of '%.*s'",
|
||||||
parentLen, tzSym);
|
parentLen, tzSym);
|
||||||
}
|
|
||||||
|
|
||||||
scope = parent;
|
scope = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsym = findsymbol(tzSym, scope);
|
nsym = findsymbol(tzSym, scope);
|
||||||
|
|
||||||
if (nsym != NULL) {
|
if (!nsym)
|
||||||
if (sym_IsDefined(nsym)) {
|
|
||||||
yyerror("'%s' already defined in %s(%d)", tzSym,
|
|
||||||
nsym->tzFileName, nsym->nFileLine);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
nsym = createsymbol(tzSym);
|
nsym = createsymbol(tzSym);
|
||||||
}
|
else if (sym_IsDefined(nsym))
|
||||||
|
yyerror("'%s' already defined in %s(%d)", tzSym,
|
||||||
|
nsym->tzFileName, nsym->nFileLine);
|
||||||
|
|
||||||
nsym->nValue = nPC;
|
nsym->nValue = nPC;
|
||||||
nsym->type = SYM_LABEL;
|
nsym->type = SYM_LABEL;
|
||||||
|
|||||||
Reference in New Issue
Block a user