Skip to content

Commit

Permalink
Fix comparison in rd_list_remove_cmp (closes #1493)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhill committed Nov 12, 2017
1 parent cc0d7af commit 9e7cbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rdlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void *rd_list_remove_cmp (rd_list_t *rl, void *match_elem,
int i;

RD_LIST_FOREACH(elem, rl, i) {
if (match_elem == cmp ||
if (elem == match_elem ||
!cmp(elem, match_elem)) {
rd_list_remove0(rl, i);
return elem;
Expand Down

0 comments on commit 9e7cbf4

Please sign in to comment.