From 1f71f6f701705065460bd1b214f0a4c7ceac49d0 Mon Sep 17 00:00:00 2001 From: jiaxianhua Date: Sat, 11 Nov 2023 19:53:55 +0800 Subject: [PATCH] Update linked_list.md (#935) There is no need to declare next --- docs/chapter_array_and_linkedlist/linked_list.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/chapter_array_and_linkedlist/linked_list.md b/docs/chapter_array_and_linkedlist/linked_list.md index 6b4277d48..e485bb52d 100755 --- a/docs/chapter_array_and_linkedlist/linked_list.md +++ b/docs/chapter_array_and_linkedlist/linked_list.md @@ -152,7 +152,7 @@ /* 构造函数 */ ListNode *newListNode(int val) { - ListNode *node, *next; + ListNode *node; node = (ListNode *) malloc(sizeof(ListNode)); node->val = val; node->next = NULL; @@ -618,7 +618,7 @@ /* 构造函数 */ ListNode *newListNode(int val) { - ListNode *node, *next; + ListNode *node; node = (ListNode *) malloc(sizeof(ListNode)); node->val = val; node->next = NULL;