Browse Source

inp_search_closing_paren(), cleanup

pre-master-46
rlar 13 years ago
parent
commit
f8a06900c2
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

@ -1792,12 +1792,14 @@ inp_search_closing_paren1(char *s)
{ {
int count = 1; int count = 1;
// assert(*s == '(') // assert(*s == '(')
while (count != 0 && *s != '\0') {
while (*s != '\0') {
s++; s++;
if (*s == '(') if (*s == '(')
count++; count++;
if (*s == ')') if (*s == ')')
count--; count--;
if (count == 0)
break;
} }
if (count != 0) if (count != 0)
return NULL; return NULL;

Loading…
Cancel
Save