From ebc50b8639adb240af7164323a663c3965f8c420 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 13 Oct 2012 16:48:15 +0200 Subject: [PATCH] inpcom.c, rewrite --- src/frontend/inpcom.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 61c73e7b7..342675754 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1657,13 +1657,6 @@ inp_fix_ternary_operator_str(char *line, bool all) str_ptr = skip_ws(str_ptr + 1); if (*str_ptr == '{') str_ptr = skip_ws(str_ptr + 1); - - question = strchr(str_ptr, '?'); - paren_ptr = strchr(str_ptr, '('); - - if (paren_ptr && paren_ptr < question) - paren_ptr = NULL; - } else { return line; } @@ -1733,7 +1726,8 @@ inp_fix_ternary_operator_str(char *line, bool all) // get else str_ptr = skip_ws(colon + 1); - if (paren_ptr != NULL) { + paren_ptr = strchr(question, '('); + if (paren_ptr) { // find end paren ')' bool found_paren = FALSE; count = 0;