Skip to content

Commit

Permalink
Another direct key cast from bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
rtheunissen committed Aug 31, 2016
1 parent 3d8c7e0 commit 59f59ff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ds/ds_htable.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,8 @@ static int user_compare_by_key(const void *a, const void *b)
static int compare_by_key(const void *a, const void *b)
{
zval retval;
ds_htable_bucket_t *x = (ds_htable_bucket_t*) a;
ds_htable_bucket_t *y = (ds_htable_bucket_t*) b;

if (compare_function(&retval, &x->key, &y->key) == SUCCESS) {
if (compare_function(&retval, (zval*) a, (zval*) b) == SUCCESS) {
return zval_get_long(&retval);
}

Expand Down

0 comments on commit 59f59ff

Please sign in to comment.