From 326bf396778bc9ab8f9e253bb514e7f41ef1502b Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 6 Mar 2007 20:44:19 -0500 Subject: Use uint32_t for all packed object counts. As we permit up to 2^32-1 objects in a single packfile we cannot use a signed int to represent the object offset within a packfile, after 2^31-1 objects we will start seeing negative indexes and error out or compute bad addresses within the mmap'd index. This is a minor cleanup that does not introduce any significant logic changes. It is roach free. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- builtin-fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-fsck.c') diff --git a/builtin-fsck.c b/builtin-fsck.c index 6abf498d2..39cfc3281 100644 --- a/builtin-fsck.c +++ b/builtin-fsck.c @@ -632,7 +632,7 @@ int cmd_fsck(int argc, char **argv, const char *prefix) verify_pack(p, 0); for (p = packed_git; p; p = p->next) { - int num = num_packed_objects(p); + uint32_t i, num = num_packed_objects(p); for (i = 0; i < num; i++) { unsigned char sha1[20]; nth_packed_object_sha1(p, i, sha1); -- cgit v1.2.1