summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2019-11-16 10:36:56 -0800
committerJim Meyering <meyering@fb.com>2019-11-16 10:37:25 -0800
commit0effe42bf401eb5be2d977ec87c2fadb8fd1d5ba (patch)
treef7e5aa42e86963c8a0b88c27f1abb56575835781
parent090a4dbe03951e427f03f83be424caacc3303799 (diff)
downloadgrep-0effe42bf401eb5be2d977ec87c2fadb8fd1d5ba.tar.gz
maint: correct and clarify a comment
* src/kwsearch.c (Fexecute): Logic was reversed.
-rw-r--r--src/kwsearch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kwsearch.c b/src/kwsearch.c
index 65e056c6..b2d4fa4f 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -228,9 +228,9 @@ Fexecute (void *vcp, char const *buf, size_t size, size_t *match_size,
char const *bol = memrchr (mb_start, eol, beg - mb_start);
mb_start = bol ? bol + 1 : buf;
- /* Succeed if the preceding and following characters are word
- constituents. If the following character is not a word
- constituent, keep trying with shorter matches. */
+ /* Succeed if neither the preceding nor the following character is a
+ word constituent. If the preceding is not, yet the following
+ character IS a word constituent, keep trying with shorter matches. */
if (! wordchar_prev (mb_start, beg, buf + size))
for (;;)
{