Jeff King 61d36330b4 prefer "!=" when checking read_in_full() result
Comparing the result of read_in_full() using less-than is
potentially dangerous, as a negative return value may be
converted to an unsigned type and be considered a success.
This is discussed further in 561598cfcf (read_pack_header:
handle signed/unsigned comparison in read result,
2017-09-13).

Each of these instances is actually fine in practice:

 - in get-tar-commit-id, the HEADERSIZE macro expands to a
   signed integer. If it were switched to an unsigned type
   (e.g., a size_t), then it would be a bug.

 - the other two callers check for a short read only after
   handling a negative return separately. This is a fine
   practice, but we'd prefer to model "!=" as a general
   rule.

So all of these cases can be considered cleanups and not
actual bugfixes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-27 15:45:24 +09:00
..
2016-11-22 13:55:20 -08:00
2017-09-06 13:11:25 +09:00
2017-08-23 15:12:07 -07:00
2017-06-24 14:28:41 -07:00
2017-08-03 13:11:02 -07:00
2017-03-31 08:33:56 -07:00
2017-08-26 22:55:09 -07:00
2017-09-06 17:19:54 +09:00
2017-08-24 10:20:02 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-09-19 10:47:57 +09:00
2017-08-03 13:11:02 -07:00
2017-09-19 10:47:52 +09:00
2017-09-10 17:08:22 +09:00
2017-08-26 22:55:09 -07:00
2017-08-22 10:29:03 -07:00
2017-07-10 13:42:51 -07:00
2017-06-24 14:28:41 -07:00
2017-09-19 10:47:55 +09:00
2017-08-03 13:11:02 -07:00
2017-08-22 10:29:03 -07:00
2017-01-23 18:51:56 -08:00
2017-09-19 10:47:55 +09:00
2017-06-24 14:28:41 -07:00