On Fri, Jun 3, 2016 at 5:19 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > > My only minor reservation is that it your concise version is still > subtle with regard to not taking 'linelen' into account. At first > glance, it looks like a bug that it doesn't consider the logical > end-of-line, and someone reading the code has to put in extra effort > to convince himself that the code works as intended. > > For that reason, I have a bit of a preference for a version of > is_mboxrd_from() which does take 'linelen' into account explicitly. That certainly is true. You could check that the end result did not consume more than linelen after the single-liner computes its result, but I am not sure under what condition that check would trigger. Even though we may hold the entire e-mail file without NUL-terminating each line, we have a NUL-termination at the end of the file, no? -- 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