modnames, inp_subckt, modnames need not be static any longer, EXACT

wl_free can cope with NULL argument.
  trailing modnames = NULL not neccessairy, nobody reads it.
This commit is contained in:
rlar 2012-03-11 21:48:31 +01:00
parent 0478f3d691
commit f2cc623d0f
1 changed files with 2 additions and 7 deletions

View File

@ -157,8 +157,7 @@ inp_subcktexpand(struct line *deck) {
char *t;
int i;
wordlist *wl;
static wordlist *modnames;
modnames = NULL;
wordlist *modnames = NULL;
if(!cp_getvar("substart", CP_STRING, start))
(void) strcpy(start, ".subckt");
@ -327,11 +326,7 @@ inp_subcktexpand(struct line *deck) {
#endif /* TRACE */
ll = doit(deck, modnames);
/* SJB: free up the modnames linked list now we are done with it */
if(modnames != NULL) {
wl_free(modnames);
modnames = NULL;
}
wl_free(modnames);
/* Count numbers of line in deck after expansion */
if (ll!=NULL) {