Skip to content

Commit

Permalink
Remove a division that was troubling Clang static analysis.
Browse files Browse the repository at this point in the history
Fixes #166.
  • Loading branch information
Quuxplusone committed Dec 15, 2018
1 parent ba205de commit 02b0706
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/uthash.h
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,9 @@ do {
_he_newbkt = &(_he_new_buckets[_he_bkt]); \
if (++(_he_newbkt->count) > (tbl)->ideal_chain_maxlen) { \
(tbl)->nonideal_items++; \
_he_newbkt->expand_mult = _he_newbkt->count / (tbl)->ideal_chain_maxlen; \
if (_he_newbkt->count > _he_newbkt->expand_mult * (tbl)->ideal_chain_maxlen) { \
_he_newbkt->expand_mult++; \
} \
} \
_he_thh->hh_prev = NULL; \
_he_thh->hh_next = _he_newbkt->hh_head; \
Expand Down

1 comment on commit 02b0706

@tstruk
Copy link

@tstruk tstruk commented on 02b0706 Dec 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Quuxplusone do you have any plans for a new release, which will include this change?

Please sign in to comment.