diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-01-14 11:57:06 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-01-15 16:38:56 -0800 |
commit | eae77386eb4425ed096a168b909220ea8b27657a (patch) | |
tree | 1b4b7e07c07e23fd00ffb743aa1dd91c4a05caee /src/grep.c | |
parent | 6de66dd6be1e809f398477dfb2223341e38afce4 (diff) | |
download | grep-eae77386eb4425ed096a168b909220ea8b27657a.tar.gz |
grep: fix rawmemrchr etc. comments
* src/grep.c: Fix comments.
Diffstat (limited to 'src/grep.c')
-rw-r--r-- | src/grep.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |