nupa_substitute(), reduce scope of local variabes

This commit is contained in:
rlar 2017-11-18 21:24:14 +01:00
parent bd335cb5be
commit ef1d896cee
1 changed files with 5 additions and 5 deletions

View File

@ -1182,8 +1182,8 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
bug: wont flag overflow! bug: wont flag overflow!
*/ */
{ {
int level, nnest, ir = 0; int ir = 0;
char c, d; char d;
bool err = 0; bool err = 0;
SPICE_DSTRING qstr; /* temp result dynamic string */ SPICE_DSTRING qstr; /* temp result dynamic string */
@ -1193,12 +1193,12 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
while ((s < s_end) && !err) { while ((s < s_end) && !err) {
c = *s++; char c = *s++;
if (c == '{') { if (c == '{') {
/* try ps expression syntax */ /* try ps expression syntax */
const char *kptr = s; const char *kptr = s;
nnest = 1; int nnest = 1;
do do
{ {
@ -1245,7 +1245,7 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
if (s[-1] == '(') { if (s[-1] == '(') {
/* sub-formula */ /* sub-formula */
const char *kptr = s; const char *kptr = s;
level = 1; int level = 1;
do do
{ {