numparam/xpressn.c, #2/5, cleanup, drop 'err' and return early
This commit is contained in:
parent
303d78f616
commit
146ca72153
|
|
@ -481,7 +481,7 @@ nupa_define(dico_t *dico,
|
||||||
we mark each id with its subckt level, and warn if write at higher one.
|
we mark each id with its subckt level, and warn if write at higher one.
|
||||||
*/
|
*/
|
||||||
char c;
|
char c;
|
||||||
bool err, warn;
|
bool warn;
|
||||||
entry_t *entry; /* spice table entry */
|
entry_t *entry; /* spice table entry */
|
||||||
NGHASHPTR htable_p; /* hash table */
|
NGHASHPTR htable_p; /* hash table */
|
||||||
|
|
||||||
|
|
@ -492,13 +492,9 @@ nupa_define(dico_t *dico,
|
||||||
htable_p = dico->symbols[dico->stack_depth];
|
htable_p = dico->symbols[dico->stack_depth];
|
||||||
|
|
||||||
entry = attrib(dico, htable_p, t, op);
|
entry = attrib(dico, htable_p, t, op);
|
||||||
err = 0;
|
|
||||||
|
|
||||||
if (!entry) {
|
if (!entry)
|
||||||
|
return message(dico, " Symbol table overflow\n");
|
||||||
err = message(dico, " Symbol table overflow\n");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if (entry->tp == 'P')
|
if (entry->tp == 'P')
|
||||||
entry = entry->pointer; /* pointer indirection */
|
entry = entry->pointer; /* pointer indirection */
|
||||||
|
|
@ -531,9 +527,8 @@ nupa_define(dico_t *dico,
|
||||||
if (0)
|
if (0)
|
||||||
message(dico, "%s: cannot redefine\n", t);
|
message(dico, "%s: cannot redefine\n", t);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return err;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue