Re: [PATCH 5/7] pkt-line: check write_in_full() errors against "< 0"

2017-09-13 Thread Jonathan Nieder
Jeff King wrote: > As with the previous two commits, we prefer to check > write_in_full()'s return value to see if it is negative, > rather than comparing it to the input length. > > These cases actually flip the logic to check for success, > making conversion a little different than in other

[PATCH 5/7] pkt-line: check write_in_full() errors against "< 0"

2017-09-13 Thread Jeff King
As with the previous two commits, we prefer to check write_in_full()'s return value to see if it is negative, rather than comparing it to the input length. These cases actually flip the logic to check for success, making conversion a little different than in other cases. We could of course write: