From 11e024753a9966e8dc951a0a1a11e8d1bc20cd56 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 17 Nov 2017 17:09:24 +0100 Subject: [PATCH] stripbraces(), cleanup --- src/frontend/numparam/spicenum.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 792c83cdc..d5c7a824c 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -92,12 +92,11 @@ static int stripbraces(SPICE_DSTRINGPTR dstr_p) /* puts the funny placeholders. returns the number of {...} substitutions */ { - int n, nest; + int n = 0; char *s = spice_dstring_value(dstr_p); char *p, *brace; SPICE_DSTRING tstr; /* temporary dynamic string */ - n = 0; spice_dstring_init(&tstr); p = s; @@ -105,7 +104,7 @@ stripbraces(SPICE_DSTRINGPTR dstr_p) /* something to strip */ const char *j_ptr = brace + 1; - nest = 1; + int nest = 1; n++; while ((nest > 0) && *j_ptr) {