aboutsummaryrefslogtreecommitdiff
path: root/ks_index.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-10-19 02:00:43 -0400
committerRob Austein <sra@hactrn.net>2016-10-19 02:00:43 -0400
commitb252694ce6aafcdec2dd268196029f17ab0c6335 (patch)
treef165d10baaf1df978b117187f926fc273ca254a3 /ks_index.c
parentc982e2e9344ab0c22f8c158cfb61da88485660d5 (diff)
Shake first round of bugs out of hal_rpc_pkey_match().
The filtering code for this function has not been tested yet.
Diffstat (limited to 'ks_index.c')
-rw-r--r--ks_index.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ks_index.c b/ks_index.c
index 5bf2ce5..23ba8c1 100644
--- a/ks_index.c
+++ b/ks_index.c
@@ -171,8 +171,7 @@ hal_error_t hal_ks_index_find(hal_ks_index_t *ksi,
int where;
- if (!ks_find(ksi, name, chunk, hint, &where))
- return HAL_ERROR_KEY_NOT_FOUND;
+ int ok = ks_find(ksi, name, chunk, hint, &where);
if (blockno != NULL)
*blockno = ksi->index[where];
@@ -180,7 +179,7 @@ hal_error_t hal_ks_index_find(hal_ks_index_t *ksi,
if (hint != NULL)
*hint = where;
- return HAL_OK;
+ return ok ? HAL_OK : HAL_ERROR_KEY_NOT_FOUND;
}
hal_error_t hal_ks_index_find_range(hal_ks_index_t *ksi,