Fixed: returns mlistelem instead of dataptr
This commit is contained in:
parent
f12d9060f9
commit
c0038c2dd6
@ -5,7 +5,7 @@ struct mlistelem * mlist_get(mlist_t list, const void *data){
|
|||||||
mlist_foreach(elem,list){
|
mlist_foreach(elem,list){
|
||||||
void *tdata = mlistelem_dataptr(elem);
|
void *tdata = mlistelem_dataptr(elem);
|
||||||
if (list->cmp(tdata,data)==0){
|
if (list->cmp(tdata,data)==0){
|
||||||
return tdata;
|
return elem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user