Re: [PATCH 4/5] grep: mark "haystack" buffers as const
- From
Jeff King <peff@peff.net>
- Date
- Sep 21, 2021, 14:27 UTC
- Message-ID
- <YUnry6IgLyf5LI6g@coredump.intra.peff.net>
- In-Reply-To
- <87h7ee9lsf.fsf@evledraar.gmail.com>
On Tue, Sep 21, 2021 at 02:04:12PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 11 quoted lines
> > On Mon, Sep 20 2021, Jeff King wrote: > > > -static int patmatch(struct grep_pat *p, char *line, char *eol, > > +static int patmatch(struct grep_pat *p, > > + const char *line, const char *eol, > > regmatch_t *match, int eflags) > > nit; not worth a re-roll, over-line-wrapping here? You usually stay at > column 79. In this case both line and eol would fit on the patmatch() > lin, which is being changed anyway...
True. I had to wrap all the others (and IMHO it is worth keeping "line" and "eol" together), but I didn't calculate that this one can actually fit the whole thing.
I dunno that it matters. The wrapping is consistent with the others, even if it is not maximally filling the line.
-Peff