diff options
author | Jeff King <peff@peff.net> | 2017-09-13 13:17:30 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-14 15:17:59 +0900 |
commit | 4c95e3dd28342878e0deed264ddc784b775361b7 (patch) | |
tree | 42725a586833e30d8e790244a63b593bf5844a2a /dir-iterator.h | |
parent | convert less-trivial versions of "write_in_full() != len" (diff) | |
download | tgif-4c95e3dd28342878e0deed264ddc784b775361b7.tar.xz |
pkt-line: check write_in_full() errors against "< 0"
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:
if (write_in_full(...) >= 0)
return 0;
return error(...);
But our usual method of spelling write() error checks is
just "< 0". So let's flip the logic for each of these
conditionals to our usual style.
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir-iterator.h')
0 files changed, 0 insertions, 0 deletions