From f2cc623d0fbde1d097e7b62f29ef0ccfe61b5044 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 11 Mar 2012 21:48:31 +0100 Subject: [PATCH] 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. --- src/frontend/subckt.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index d96bced21..465a6dd07 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -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) {