From 16ed6a71e7dd48d46c923ed602329a12009e499e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=9D=E4=B9=9F?= Date: Sat, 2 Nov 2019 15:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8Delem=E7=9A=84next=E4=B8=8D?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4=E7=9A=84=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=93=BE=E8=A1=A8=E8=80=8C=E9=9D=9E=E7=BB=93?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c-cpp/06_linkedlist/single_list.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; }