From 03440bb7a953e3dbc9b5e6756ee9e2995c0cfea4 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Mon, 18 May 2015 20:18:14 -0400 Subject: [PATCH] ck_rhs: Minor style knit. --- src/ck_rhs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ck_rhs.c b/src/ck_rhs.c index 51c05b1..f1b9a55 100644 --- a/src/ck_rhs.c +++ b/src/ck_rhs.c @@ -915,6 +915,7 @@ ck_rhs_put_robin_hood(struct ck_rhs *hs, void *key; long prevs[CK_RHS_MAX_RH]; unsigned int prevs_nb = 0; + unsigned int i; map = hs->map; first = orig_slot; @@ -936,10 +937,13 @@ restart: if (slot == -1 && first == -1) { if (ck_rhs_grow(hs, map->capacity << 1) == false) { desc->in_rh = false; - for (unsigned int i = 0; i < prevs_nb; i++) + + for (i = 0; i < prevs_nb; i++) ck_rhs_unset_rh(map, prevs[i]); + return -1; } + return 1; }