From 6bd39e10378f2040894297fb77c543585a8105f0 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 11 Mar 2012 21:41:55 +0100 Subject: [PATCH] submod, doit() `submod0' is a true local variable submod0 is only aceesd in doit, always set NULL on entry, (almost) always restored on return was not restored on error ... fixme check this changed behaviour --- src/frontend/subckt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index 25a7e4f84..404b80f32 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -119,7 +119,7 @@ struct subs { * list of translated names (i.e. after subckt expansion) */ -static wordlist *modnames, *submod0; +static wordlist *modnames; static bool nobjthack = FALSE; /* flag indicating use of the experimental numparams library */ static bool use_numparams = FALSE; @@ -400,12 +400,11 @@ doit(struct line *deck) { int numpasses = MAXNEST; bool gotone; wordlist *tmodnames = modnames; - wordlist *tsubmod = submod0; int error; /* Save all the old stuff... */ struct subs *subs = NULL; - submod0 = NULL; + wordlist *submod0 = NULL; #ifdef TRACE /* SDB debug statement */ @@ -686,7 +685,6 @@ doit(struct line *deck) { return NULL; /* error message already reported; should free( ) */ modnames = tmodnames; - submod0 = tsubmod; /* struct subs { char *su_name;