inp_search_closing_paren(), increase similarity
This commit is contained in:
parent
59be847d28
commit
3b5c475216
|
|
@ -1799,7 +1799,7 @@ inp_search_closing_paren1(char *s)
|
||||||
if (*s == ')')
|
if (*s == ')')
|
||||||
count--;
|
count--;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return s;
|
return s + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -1910,7 +1910,7 @@ inp_fix_ternary_operator_str(char *line, bool all)
|
||||||
// get if
|
// get if
|
||||||
str_ptr = skip_ws(question + 1);
|
str_ptr = skip_ws(question + 1);
|
||||||
if (*str_ptr == '(') {
|
if (*str_ptr == '(') {
|
||||||
colon = inp_search_closing_paren1(str_ptr) + 1;
|
colon = inp_search_closing_paren1(str_ptr);
|
||||||
if (!colon) {
|
if (!colon) {
|
||||||
fprintf(stderr, "ERROR: problem parsing 'if' of ternary string %s!\n", line);
|
fprintf(stderr, "ERROR: problem parsing 'if' of ternary string %s!\n", line);
|
||||||
controlled_exit(EXIT_FAILURE);
|
controlled_exit(EXIT_FAILURE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue