From 553d1b2f5d8536be0f3debd2f2c4800e07cbfbc7 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 10 Aug 2021 17:36:10 -0700 Subject: [PATCH] strgrpmatch: reflow some text --- lib/ast/strmatch.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/ast/strmatch.c b/lib/ast/strmatch.c index 4fa5881dc..362d06030 100644 --- a/lib/ast/strmatch.c +++ b/lib/ast/strmatch.c @@ -596,18 +596,15 @@ int strgrpmatch(const char *b, const char *p, int *sub, int n, int flags) match.best.next_s = 0; match.current.groups = 0; match.current.beg[0] = 0; - if ((i = grpmatch(&match, 0, s, (char *) p, e, flags)) - || match.best.next_s) { + if ((i = grpmatch(&match, 0, s, (char *) p, e, flags)) || match.best.next_s) { if (!(flags & STR_RIGHT) || (match.current.next_s == e)) { if (!i) match.current = match.best; match.current.groups++; match.current.end[0] = match.current.next_s; #ifdef _DEBUG_MATCH - error(-1, - "match i=%d s=\"%s\" p=\"%s\" flags=%o groups=%d next=\"%s\"", - i, s, p, flags, match.current.groups, - match.current.next_s); + error(-1, "match i=%d s=\"%s\" p=\"%s\" flags=%o groups=%d next=\"%s\"", + i, s, p, flags, match.current.groups, match.current.next_s); #endif break; } @@ -626,8 +623,7 @@ int strgrpmatch(const char *b, const char *p, int *sub, int n, int flags) n = match.current.groups; for (i = 0; i < n; i++) { sub[i * 2] = match.current.end[i] ? match.current.beg[i] - s : 0; - sub[i * 2 + 1] = - match.current.end[i] ? match.current.end[i] - s : 0; + sub[i * 2 + 1] = match.current.end[i] ? match.current.end[i] - s : 0; } return n; } -- 2.49.0