From 51516312ce3e8a3d91de08ec8da1ee31de110dc5 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 16 Sep 2012 23:40:29 -0400 Subject: [PATCH] ck_hs: Clear bits in iterator. --- src/ck_hs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ck_hs.c b/src/ck_hs.c index aabd6e2..f6285dd 100644 --- a/src/ck_hs.c +++ b/src/ck_hs.c @@ -81,6 +81,10 @@ ck_hs_next(struct ck_hs *hs, struct ck_hs_iterator *i, void **key) do { *key = map->entries[i->offset]; if (key != CK_HS_EMPTY && key != CK_HS_TOMBSTONE) { +#ifdef CK_HS_PP + if (hs->mode & CK_HS_MODE_OBJECT) + *key = (void *)((uintptr_t)*key & (((uintptr_t)1 << CK_MD_VMA_BITS) - 1)); +#endif i->offset++; return true; }