get-tar-commit-id: check write_in_full() return against 0
commit68a423ab3e5c160e1162382d2ef0831039b298d4
authorJeff King <peff@peff.net>
Wed, 13 Sep 2017 17:11:28 +0000 (13 13:11 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Sep 2017 06:16:21 +0000 (14 15:16 +0900)
tree85e6b35d1f5e3d27464ccba74ca9f12a99cc58be
parentefacf609c8f832be3e4ead634c054c8d52a00ad0
get-tar-commit-id: check write_in_full() return against 0

We ask to write 41 bytes and make sure that the return value
is at least 41. This is the same "dangerous" pattern that
was fixed in the prior commit (wherein a negative return
value is promoted to unsigned), though it is not dangerous
here because our "41" is a constant, not an unsigned
variable.

But we should convert it anyway to avoid modeling a
dangerous construct.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/get-tar-commit-id.c