From 70ad8cce5f1df5484ffc60f121dc5d52389690b5 Mon Sep 17 00:00:00 2001 From: rlar Date: Mon, 3 Nov 2014 19:57:21 +0100 Subject: [PATCH] inp_modify_exp(), cleanup #17/17, polish while loop --- src/frontend/inpcom.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 20566fb16..4dd92c3ac 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -5506,12 +5506,10 @@ inp_modify_exp(char* expr) /* scan the expression */ s = expr; - while (*s != '\0') { - char c; - s = skip_ws(s); - if (*s == '\0') - break; - c = *s; + while (*(s = skip_ws(s))) { + + char c = *s; + wl_append_word(&wlist, &wl, NULL); if ((c == ',') || (c == '(') || (c == ')') ||