summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 68d42c4)
raw | patch | inline | side by side (parent: 68d42c4)
author | Pierre Habouzit <madcoder@debian.org> | |
Wed, 23 Aug 2006 09:17:55 +0000 (11:17 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 23 Aug 2006 10:05:27 +0000 (03:05 -0700) |
(1 << i) < hspace is compared in the `int` space rather that in the
unsigned one. the result will be wrong if hspace is between 0x40000000
and 0x80000000.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
unsigned one. the result will be wrong if hspace is between 0x40000000
and 0x80000000.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff-delta.c | patch | blob | history |
diff --git a/diff-delta.c b/diff-delta.c
index 7da9205a5da6a4f016bc6b556bee01895cdcc19d..51e2e561772f490eb59f534a62754993bba2a743 100644 (file)
--- a/diff-delta.c
+++ b/diff-delta.c
initialization in create_delta(). */
entries = (bufsize - 1) / RABIN_WINDOW;
hsize = entries / 4;
- for (i = 4; (1 << i) < hsize && i < 31; i++);
+ for (i = 4; (1u << i) < hsize && i < 31; i++);
hsize = 1 << i;
hmask = hsize - 1;