summaryrefslogtreecommitdiff
path: root/src/delta.c
diff options
context:
space:
mode:
authorJared Wong <jaredlwong@gmail.com>2013-12-08 01:50:10 -0800
committerJared Wong <jaredlwong@gmail.com>2013-12-08 01:50:10 -0800
commit307a3d6762a2797ee28b43fceb1c941680ac97ec (patch)
tree835b585bdf72198cb63dec914270736439b4d97c /src/delta.c
parentc4fcae5f7cacf9478d1d92c6586615e5afcc3ac8 (diff)
downloadlibgit2-307a3d6762a2797ee28b43fceb1c941680ac97ec.tar.gz
Fixed left shift size of int.
Simply switched the ordering of the checks in the for loop where this left shift was being made.
Diffstat (limited to 'src/delta.c')
-rw-r--r--src/delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/delta.c b/src/delta.c
index b3435ba87..8375a2c4d 100644
--- a/src/delta.c
+++ b/src/delta.c
@@ -144,7 +144,7 @@ git_delta_create_index(const void *buf, unsigned long bufsize)
entries = 0xfffffffeU / RABIN_WINDOW;
}
hsize = entries / 4;
- for (i = 4; (1u << i) < hsize && i < 31; i++);
+ for (i = 4; i < 31 && (1u << i) < hsize; i++);
hsize = 1 << i;
hmask = hsize - 1;