From 1987559e899c20ae5460af9cd5e3267adff9f304 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 25 Nov 2017 15:17:48 +0100 Subject: [PATCH] nupa_subcktcall(), drop redundant initialisation for `narg' and delay its incrementation a bit --- src/frontend/numparam/xpressn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 5b88b31f7..ca511e8e0 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -1585,8 +1585,6 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name) /***** next, analyze the circuit call line */ if (!err) { - narg = 0; - scopy_up(&tstr, x); j = 0; @@ -1671,7 +1669,6 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name) u_p = spice_dstring_value(&ustr); if (u_p[0]) { char *dollar = strchr(spice_dstring_value(&idlist), '$'); - narg++; if (dollar) { k = (int) (dollar - spice_dstring_value(&idlist)); /* replace dollar with expression string u */ @@ -1681,6 +1678,7 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name) scopyd(&idlist, &vstr); sadd(&idlist, spice_dstring_value(&ustr)); } + narg++; } } } else {