diff --git a/sha1_file.c b/sha1_file.c
index 8f5fe62d545ace21c338cd554c76bac5d5acb431..1d996a199036c115d46c1d630d53edf29b3b78e7 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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;
}
if (fsync_object_files)
fsync_or_die(fd, "sha1 file");
if (close(fd) != 0)
- die("error when closing sha1 file (%s)", strerror(errno));
+ die_errno("error when closing sha1 file");
}
/* Size of directory component, including the ending '/' */