From ddf01dbe3f01f474cebf96971da564f8d1c651f7 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 3 Apr 2016 11:15:03 +0200 Subject: [PATCH] parser/inppas3.c, shrink scope of local variable `name' --- src/spicelib/parser/inppas3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/spicelib/parser/inppas3.c b/src/spicelib/parser/inppas3.c index 6e5a7d773..23778ad2c 100644 --- a/src/spicelib/parser/inppas3.c +++ b/src/spicelib/parser/inppas3.c @@ -29,7 +29,6 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task, int error; /* used by the macros defined above */ char *line; /* the part of the current line left to parse */ - char *name; /* the node's name */ char *token=NULL; /* a token from the line */ IFparm *prm; /* pointer to parameter to search through array */ @@ -66,6 +65,8 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task, } for(;;) { + char *name; /* the node's name */ + /* loop until we run out of data */ INPgetTok(&line,&name,1); if( *name == '\0') break; /* end of line */ @@ -110,6 +111,8 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task, } for(;;) { + char *name; /* the node's name */ + /* loop until we run out of data */ INPgetTok(&line,&name,1); /* check to see if in the form V(xxx) and grab the xxx */