Skip to content

Commit 1f71f6f

Browse files
authored
Update linked_list.md (krahets#935)
There is no need to declare next
1 parent c81d5e0 commit 1f71f6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/chapter_array_and_linkedlist/linked_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152

153153
/* 构造函数 */
154154
ListNode *newListNode(int val) {
155-
ListNode *node, *next;
155+
ListNode *node;
156156
node = (ListNode *) malloc(sizeof(ListNode));
157157
node->val = val;
158158
node->next = NULL;
@@ -618,7 +618,7 @@
618618

619619
/* 构造函数 */
620620
ListNode *newListNode(int val) {
621-
ListNode *node, *next;
621+
ListNode *node;
622622
node = (ListNode *) malloc(sizeof(ListNode));
623623
node->val = val;
624624
node->next = NULL;

0 commit comments

Comments
 (0)