inp_fix_ternary_operator_str(), cleanup

This commit is contained in:
rlar 2013-10-03 11:54:58 +02:00
parent be4ce38eff
commit 1a66841e36
1 changed files with 2 additions and 3 deletions

View File

@ -1914,12 +1914,11 @@ inp_fix_ternary_operator_str(char *line, bool all)
// get if
str_ptr = skip_ws(question + 1);
if (*str_ptr == '(') {
str_ptr2 = inp_search_closing_paren1(str_ptr /* +1 */);
if (!str_ptr2) {
colon = inp_search_closing_paren1(str_ptr) + 1;
if (!colon) {
fprintf(stderr, "ERROR: problem parsing 'if' of ternary string %s!\n", line);
controlled_exit(EXIT_FAILURE);
}
colon = str_ptr2 + 1;
while (*colon != ':' && *colon != '\0')
colon++;
if (*colon != ':') {