summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-01-14 11:57:06 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2023-01-15 16:38:56 -0800
commiteae77386eb4425ed096a168b909220ea8b27657a (patch)
tree1b4b7e07c07e23fd00ffb743aa1dd91c4a05caee /src
parent6de66dd6be1e809f398477dfb2223341e38afce4 (diff)
downloadgrep-eae77386eb4425ed096a168b909220ea8b27657a.tar.gz
grep: fix rawmemrchr etc. comments
* src/grep.c: Fix comments.
Diffstat (limited to 'src')
-rw-r--r--src/grep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grep.c b/src/grep.c
index 95ee5f00..9f914fc4 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1436,7 +1436,7 @@ prtext (char *beg, char *lim)
/* Replace all NUL bytes in buffer P (which ends at LIM) with EOL.
This avoids running out of memory when binary input contains a long
sequence of zeros, which would otherwise be considered to be part
- of a long line. P[LIM] should be EOL. */
+ of a long line. *LIM should be EOL. */
static void
zap_nuls (char *p, char *lim, char eol)
{
@@ -1584,7 +1584,7 @@ grep (int fd, struct stat const *st, bool *ineof)
the buffer, 0 means there is no incomplete last line). */
oldc = beg[-1];
beg[-1] = eol;
- /* FIXME: use rawmemrchr if/when it exists, since we have ensured
+ /* If rawmemrchr existed it could be used here, since we have ensured
that this use of memrchr is guaranteed never to return NULL. */
lim = memrchr (beg - 1, eol, buflim - beg + 1);
++lim;