diff --git a/sha1_file.c b/sha1_file.c
index 1964a6d39b87fe0153bf40d8d72a19cb0aea7fe7..1d996a199036c115d46c1d630d53edf29b3b78e7 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
unsigned long len, enum object_type *type, unsigned long *sizep)
{
unsigned shift;
- unsigned char c;
- unsigned long size;
+ unsigned long size, c;
unsigned long used = 0;
c = buf[used++];
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;
}