aboutsummaryrefslogtreecommitdiff
path: root/src/tests/ktests/btree2
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-14 11:45:11 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-14 11:45:11 +0200
commit2f13288a23da4dfaf6c40e1e943f83d8fa43145a (patch)
tree3b550ad22a00676470ceb2815afd21f42dfd8aae /src/tests/ktests/btree2
parent477911553e0443fcafad5bd96c97314aa2f8d9ea (diff)
downloadkogata-2f13288a23da4dfaf6c40e1e943f83d8fa43145a.tar.gz
kogata-2f13288a23da4dfaf6c40e1e943f83d8fa43145a.zip
Fix sme warnings...
Diffstat (limited to 'src/tests/ktests/btree2')
-rw-r--r--src/tests/ktests/btree2/test.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tests/ktests/btree2/test.c b/src/tests/ktests/btree2/test.c
index dd62237..f139363 100644
--- a/src/tests/ktests/btree2/test.c
+++ b/src/tests/ktests/btree2/test.c
@@ -36,8 +36,15 @@ void test_btree_2() {
if (k[i] <= xk && (ilower == -1 || k[i] > k[ilower])) ilower = i;
if (k[i] >= xk && (iupper == -1 || k[i] < k[iupper])) iupper = i;
}
- dbg_printf("random %d : lower %d (= %d), upper %d (= %d) ; ",
- xk, k[ilower], v[ilower], k[iupper], v[iupper]);
+ dbg_printf("random %d : ", xk);
+ if (ilower == -1)
+ dbg_printf("no lower, ");
+ else
+ dbg_printf("lower %d (= %d), ", k[ilower], v[ilower]);
+ if (iupper == -1)
+ dbg_printf("no upper ; ");
+ else
+ dbg_printf("upper %d (= %d) ; ", k[iupper], v[iupper]);
const uint32_t bt_lower = (uint32_t)btree_lower(ht, (void*)xk, 0);
const uint32_t bt_upper = (uint32_t)btree_upper(ht, (void*)xk, 0);
dbg_printf("got lower %d, upper %d\n", bt_lower, bt_upper);