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:

committed by
Junio C Hamano

parent
67da52bedc
commit
f630cfda88
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user