summaryrefslogtreecommitdiff
path: root/test/packing
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-07-01 09:26:30 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-07-01 09:26:30 -0400
commita92a835905a8f4d910ed6f49d1e077e47fbbf606 (patch)
treec1fe6df653abacf17ebadbd41c9a89703e2f0c3b /test/packing
parentcd1704d6c4d84c5db8ae6b471c658945ffa226f9 (diff)
downloadmongo-a92a835905a8f4d910ed6f49d1e077e47fbbf606.tar.gz
Don't shift a signed integer, the result may or may not be one-filled,
which would create an infinite loop.
Diffstat (limited to 'test/packing')
-rw-r--r--test/packing/intpack-test3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/packing/intpack-test3.c b/test/packing/intpack-test3.c
index e7b4902cee7..7005bda8546 100644
--- a/test/packing/intpack-test3.c
+++ b/test/packing/intpack-test3.c
@@ -117,7 +117,7 @@ main(void)
test_spread(INT32_MAX, 1025, 1025);
test_spread(INT64_MAX, 1025, 1025);
/* Test bigger numbers */
- for (i = INT64_MAX; i > 0; i >>= 1)
+ for (i = INT64_MAX; i > 0; i = i / 2)
test_spread(i, 1025, 1025);
printf("\n");