refactor: use bitsizeof() instead of 8 * sizeof()

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pierre Habouzit
2009-07-22 23:34:34 +02:00
committed by Junio C Hamano
parent 67da52bedc
commit f630cfda88
3 changed files with 4 additions and 3 deletions

View File

@ -1170,7 +1170,7 @@ unsigned long unpack_object_header_buffer(const unsigned char *buf,
size = c & 15;
shift = 4;
while (c & 0x80) {
if (len <= used || sizeof(long) * 8 <= shift) {
if (len <= used || bitsizeof(long) <= shift) {
error("bad object header");
return 0;
}