From f33be959bca915e53d5129092f06579ebab64323 Mon Sep 17 00:00:00 2001 From: Kent2256 Date: Wed, 5 Mar 2025 22:00:07 +0800 Subject: [PATCH] Clarify q_ascend and q_descend descriptions As q_ascend and q_descend require freeing the removed node, clarify these function descriptions by replacing "remove" with "delete". Remove redundant words after replacement. Change-Id: Ic2e20c6188d91da5f7a64decf86621ef80cf1ab4 --- queue.h | 6 ++---- scripts/checksums | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/queue.h b/queue.h index 2d9466d80..a31974eab 100644 --- a/queue.h +++ b/queue.h @@ -201,13 +201,12 @@ void q_reverseK(struct list_head *head, int k); void q_sort(struct list_head *head, bool descend); /** - * q_ascend() - Remove every node which has a node with a strictly less + * q_ascend() - Delete every node which has a node with a strictly less * value anywhere to the right side of it. * @head: header of queue * * No effect if queue is NULL or empty. If there has only one element, do * nothing. - * Memory allocated to removed nodes must be freed. * * Reference: * https://leetcode.com/problems/remove-nodes-from-linked-list/ @@ -217,13 +216,12 @@ void q_sort(struct list_head *head, bool descend); int q_ascend(struct list_head *head); /** - * q_descend() - Remove every node which has a node with a strictly greater + * q_descend() - Delete every node which has a node with a strictly greater * value anywhere to the right side of it. * @head: header of queue * * No effect if queue is NULL or empty. If there has only one element, do * nothing. - * Memory allocated to removed nodes must be freed. * * Reference: * https://leetcode.com/problems/remove-nodes-from-linked-list/ diff --git a/scripts/checksums b/scripts/checksums index f9d3af8ef..2d68e1898 100644 --- a/scripts/checksums +++ b/scripts/checksums @@ -1,3 +1,3 @@ -398b59c23f699ff1bf1e73a94503a9a91caa9207 queue.h +bff0704601c8197ae6b847647b4167664b7d6abc queue.h b26e079496803ebe318174bda5850d2cce1fd0c1 list.h 1029c2784b4cae3909190c64f53a06cba12ea38e scripts/check-commitlog.sh