return NULL;
}
-static /* const */ char *find_matching_paren ( /* const */ char *s)
+static const char *find_matching_paren (const char *s)
{
- int level = 1;
-
- for (; *s; s++) {
- if (*s == '(')
- level++;
- else if (*s == ')') {
- level--;
- if (!level)
- break;
+ int level = 1;
+
+ for (; *s; s++) {
+ level += (*s == '(') - (*s == ')');
+ if (!level)
+ break;
}
- }
- return s;
+ return s;
}
pattern_t *mutt_pattern_comp(const char *s, int flags, BUFFER *err)