diff options
author | Rob Austein <sra@hactrn.net> | 2016-10-19 02:00:43 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-10-19 02:00:43 -0400 |
commit | b252694ce6aafcdec2dd268196029f17ab0c6335 (patch) | |
tree | f165d10baaf1df978b117187f926fc273ca254a3 /ks_index.c | |
parent | c982e2e9344ab0c22f8c158cfb61da88485660d5 (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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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, |