From b58c8252cc11b2b0d2a5be43b3ef2ced17e8c2fb Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 2 Nov 2014 21:08:20 +0100 Subject: [PATCH] inp_modify_exp(), cleanup #14/17, reduce scope of `buf' --- src/frontend/inpcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 752e19011..62c567c01 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -5497,7 +5497,6 @@ inp_modify_exp(char* expr) { char *s; wordlist *wl = NULL, *wlist = NULL; - char buf[512]; enum { S_value = 0, S_operator, S_unary_minus } state = S_value; /* scan the expression and remove all '{' and '}' */ @@ -5551,6 +5550,7 @@ inp_modify_exp(char* expr) s++; state = S_unary_minus; } else if (isalpha(c)) { + char buf[512]; int i = 0; if (state == S_unary_minus) buf[i++] = '-';