Removed an possible error were the given elem in the linked list is the only one and isn't removed because of this line
This commit is contained in:
parent
1e31fe03f1
commit
40c39f2e07
|
@ -223,7 +223,6 @@ void linked_list_insert(linked_list_t *linked_list, void *data, const size_t ind
|
||||||
void linked_list_remove_elem(linked_list_t *linked_list, elem_t *elem)
|
void linked_list_remove_elem(linked_list_t *linked_list, elem_t *elem)
|
||||||
{
|
{
|
||||||
if(!elem) return;
|
if(!elem) return;
|
||||||
if(!elem->prev && !elem->next) return;
|
|
||||||
|
|
||||||
if(elem == linked_list->first)
|
if(elem == linked_list->first)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue