X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=pattern.c;h=594beda68fc52477c1cd86291a88483a185945a3;hb=c76ab67f3430e67b14b381bc1e3a23a14a4053b8;hp=ea72544f65a08ea375d726133511560be1e82603;hpb=9ce749c3b737258ad526d6afc2eb69b788a34cd4;p=apps%2Fmadmutt.git diff --git a/pattern.c b/pattern.c index ea72544..594beda 100644 --- a/pattern.c +++ b/pattern.c @@ -631,20 +631,16 @@ static const struct pattern_flags *lookup_tag (char tag) 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)