summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-01-24 11:06:30 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-01-24 11:06:30 +1100
commit4c60bd9dde0e54723519fe57be45935ea698b117 (patch)
tree76e0352841a3504d7314832cd93ca27940174676 /ext
parent74f1c39f15dcd729f79c6470b0888f17322ec204 (diff)
downloadmongo-4c60bd9dde0e54723519fe57be45935ea698b117.tar.gz
Fix a "may be uninitialized" warning in zlib.
Diffstat (limited to 'ext')
-rw-r--r--ext/compressors/zlib/zlib_compress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/compressors/zlib/zlib_compress.c b/ext/compressors/zlib/zlib_compress.c
index 72520615b0d..64da4d24d6e 100644
--- a/ext/compressors/zlib/zlib_compress.c
+++ b/ext/compressors/zlib/zlib_compress.c
@@ -183,12 +183,12 @@ zlib_find_slot(uint32_t target, uint32_t *offsets, uint32_t slots)
{
uint32_t base, indx, limit;
+ indx = 0;
+
/* Figure out which slot we got to: binary search */
- if (target < offsets[1])
- indx = 0;
- else if (target >= offsets[slots])
+ if (target >= offsets[slots])
indx = slots;
- else
+ else if (target >= offsets[1])
for (base = 1, limit = slots - 1; limit != 0; limit >>= 1) {
indx = base + (limit >> 1);