Re: [PATCH 1/3] pretty: support "mboxrd" output format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 31, 2016 at 2:29 PM, Eric Wong <e@xxxxxxxxx> wrote:
> Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>> On Tue, May 31, 2016 at 3:45 AM, Eric Wong <e@xxxxxxxxx> wrote:
>> > Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> <snip>  Ah thanks, I can see your point-of-view, now.
> I always had the '^' in my mind since I've written the same
> thing in Perl and Ruby.

On reflection, even with the '^' anchor, it isn't safe the way it's
coded since '^' will match following a newline, won't it? Therefore,
because 'line' isn't necessarily NUL-terminated, the pattern could
match on some line beyond what get_one_line() considers the "current
line".

This makes the hand-coded is_mboxrd_from() even more attractive; plus
you can re-use it in patch 2.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]