Fix two code style errors

This commit is contained in:
ISSOtm
2020-02-13 20:43:47 +01:00
parent 30a95d735a
commit bc80e910ed

View File

@@ -547,28 +547,24 @@ void sym_AddReloc(char const *tzSym)
pScope->pScope : pScope;
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",
tzSym);
} else if (strlen(parent->tzName) != parentLen
|| strncmp(tzSym, parent->tzName, parentLen) != 0) {
else if (strlen(parent->tzName) != parentLen
|| strncmp(tzSym, parent->tzName, parentLen) != 0)
yyerror("Not currently in the scope of '%.*s'",
parentLen, tzSym);
}
scope = parent;
}
nsym = findsymbol(tzSym, scope);
if (nsym != NULL) {
if (sym_IsDefined(nsym)) {
if (!nsym)
nsym = createsymbol(tzSym);
else if (sym_IsDefined(nsym))
yyerror("'%s' already defined in %s(%d)", tzSym,
nsym->tzFileName, nsym->nFileLine);
}
} else {
nsym = createsymbol(tzSym);
}
nsym->nValue = nPC;
nsym->type = SYM_LABEL;