From ab15f0b7bb0ca28d4866b97df763ba2da32aea9c Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 16 Nov 2017 22:15:22 +0100 Subject: [PATCH] stripbraces(), group `s + i' --- src/frontend/numparam/spicenum.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 50a4b948e..58abb136f 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -92,15 +92,14 @@ static int stripbraces(SPICE_DSTRINGPTR dstr_p) /* puts the funny placeholders. returns the number of {...} substitutions */ { - int n, i, nest; - char *s; /* value of dynamic string */ + int n, nest; + char *s = spice_dstring_value(dstr_p); char *brace; SPICE_DSTRING tstr; /* temporary dynamic string */ n = 0; spice_dstring_init(&tstr); - s = spice_dstring_value(dstr_p); - i = 0; + s + i = s; while ((brace = strchr(s + i, '{')) != NULL) { @@ -137,7 +136,7 @@ stripbraces(SPICE_DSTRINGPTR dstr_p) sadd(&tstr, j_ptr); scopyd(dstr_p, &tstr); s = spice_dstring_value(dstr_p); - i = ilen; + s + i = s + ilen; } dynsubst = placeholder;