diff --git a/c-cpp/06_linkedlist/single_list.c b/c-cpp/06_linkedlist/single_list.c index a267595..82ae084 100644 --- a/c-cpp/06_linkedlist/single_list.c +++ b/c-cpp/06_linkedlist/single_list.c @@ -31,8 +31,7 @@ void insert(struct single_list **prev, struct single_list *elem) if (!prev) return; - if (*prev) - elem->next = *prev; + elem->next = *prev; *prev = elem; }