diff options
author | Ondrej Kos <okos@redhat.com> | 2013-04-10 16:38:20 +0200 |
---|---|---|
committer | Ondrej Kos <okos@redhat.com> | 2013-04-10 17:51:34 +0200 |
commit | c1e2175844ffb99cd56da5859f5d197f122519a8 (patch) | |
tree | 5545dbc08a1c3404294122a25edd458b5e635f9e /dhash/dhash.c | |
parent | 30d760b2888e3d2a55390b1691bbab4ff2d39cf0 (diff) | |
download | ding-libs-c1e2175844ffb99cd56da5859f5d197f122519a8.tar.gz ding-libs-c1e2175844ffb99cd56da5859f5d197f122519a8.tar.xz ding-libs-c1e2175844ffb99cd56da5859f5d197f122519a8.zip |
DHASH: minor fixes
https://fedorahosted.org/sssd/ticket/1877
fix coverity issue 11620
fix compilation warning (missing HI_STATE_0 in switch)
Diffstat (limited to 'dhash/dhash.c')
-rw-r--r-- | dhash/dhash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dhash/dhash.c b/dhash/dhash.c index ab1bebc..d73b7e5 100644 --- a/dhash/dhash.c +++ b/dhash/dhash.c @@ -716,7 +716,7 @@ int hash_iterate(hash_table_t *table, hash_iterate_callback callback, void *user static hash_entry_t *hash_iter_next(struct hash_iter_context_t *iter_arg) { struct _hash_iter_context_t *iter = (struct _hash_iter_context_t *) iter_arg; - hash_entry_t *entry; + hash_entry_t *entry = NULL; enum hash_iter_state state = HI_STATE_3A; if (iter->table == NULL) return NULL; @@ -724,6 +724,8 @@ static hash_entry_t *hash_iter_next(struct hash_iter_context_t *iter_arg) while (state != HI_STATE_0) { switch (state) { + case HI_STATE_0: + break; case HI_STATE_1: iter->i++; if(iter->i >= iter->table->segment_count) return NULL; |