From f630cfda8800aee03c7eb2fcd0f840730fbe43b9 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 22 Jul 2009 23:34:34 +0200 Subject: refactor: use bitsizeof() instead of 8 * sizeof() Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- sha1_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sha1_file.c') diff --git a/sha1_file.c b/sha1_file.c index 4576ff77f3..1d996a1990 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -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; } -- cgit v1.2.1