doit, shrink scope of `ks'

This commit is contained in:
rlar 2012-03-07 20:51:07 +01:00
parent 8fd8611bc4
commit a78251d5da
1 changed files with 4 additions and 1 deletions

View File

@ -397,7 +397,7 @@ inp_subcktexpand(struct line *deck) {
static struct line *
doit(struct line *deck) {
struct line *c, *last, *lc, *lcc;
struct subs *sssfree = NULL, *sss = NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */
struct subs *sssfree = NULL, *sss = NULL; /* *sss temporarily hold decks to substitute */
char *s, *t;
int nest, numpasses = MAXNEST, i;
bool gotone;
@ -515,10 +515,13 @@ doit(struct line *deck) {
return (deck);
/* Otherwise, expand sub-subcircuits recursively. */
{
struct subs *ks;
for (ks = sss = subs; sss; sss = sss->su_next) /* iterate through the list of subcircuits */
if ((sss->su_def = doit(sss->su_def)) == NULL)
return (NULL);
subs = ks; /* ks has held pointer to start of subcircuits list. */
}
#ifdef TRACE
/* SDB debug statement */