Skip to content

Commit 2ca2c9f

Browse files
committed
bug fix
1 parent 2aeb97d commit 2ca2c9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/clist.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ int clist_ins_next(CList *list, CListElmt *element, const void *data);
6464

6565

6666
/**
67-
在指定链表 list 中移除 element 元素 - O(1)
67+
在指定链表 list 中移除 element 后的元素 - O(1)
6868
6969
@param list 指定的循环链表
70-
@param element 待移除元素,如果为 NULL 则移除头部
70+
@param element 待移除元素前面的元素,如果为 NULL 则移除头部
7171
@param data 已移除元素的存储数据
7272
@return 成功返回 0,否则返回 -1
7373
*/

include/list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ void list_destroy(List *list);
5454

5555

5656
/**
57-
在指定链表 list 中 element 后面插入一个新元素
57+
在指定链表 list 中 element 后面插入一个新元素 - O(1)
5858
59-
@param list 指定的链表 - O(1)
59+
@param list 指定的链表
6060
@param element 新元素,如果为 NULL 则插入头部
6161
@param data 元素数据
6262
@return 成功返回 1,否则返回 -1
@@ -65,10 +65,10 @@ int list_ins_next(List *list, ListElmt *element, const void *data);
6565

6666

6767
/**
68-
在指定链表 list 中移除 element 元素 - O(1)
68+
在指定链表 list 中移除 element 后的元素 - O(1)
6969
7070
@param list 指定的链表
71-
@param element 待移除元素,如果为 NULL 则移除头部
71+
@param element 待移除元素前的元素,如果为 NULL 则移除头部
7272
@param data 已移除元素的存储数据
7373
@return 成功返回 0,否则返回 -1
7474
*/

0 commit comments

Comments
 (0)