Re: [PATCH v15 07/13] ref-filter: add support for %(contents:lines=X)
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Sep 3, 2015, 15:05 UTC
- Message-ID
- <vpqoahjfsrf.fsf@anie.imag.fr>
- In-Reply-To
- <CAPig+cS9mBNhCm2Ea9jkAK7ME9U1QJ=xYgF_zWzThTVsZCHmdQ@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
> Also, if 'buf' is indeed unconditionally NUL-terminated, then the (sp > <= buf + size) check is wasted code since the result of strstr() will > always be either NULL or pointing somewhere within the NUL-terminated > string.
The null character is there, but after the signature. buf + size points before the signature.
Anyway, all this should go away if Karthik applies my suggestion, which I like even more after this discussion ;-).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/