Skip to content

Commit

Permalink
ensure returning 0 on success
Browse files Browse the repository at this point in the history
the ht_call callback can return 1 to commence removal of the processed
item, but ht_call() itself should return 0 because it succeeded
  • Loading branch information
Andrea Guzzo committed Sep 2, 2014
1 parent a345fba commit 8b28dc8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ ht_call(hashtable_t *table,
free(item->key);
free(item);
ATOMIC_DECREMENT(table->count);
ret = 0;
}
} else {
ret = 0;
Expand Down

0 comments on commit 8b28dc8

Please sign in to comment.