This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch revert-11848-24030602 in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a4199be692e214dec6a83aea00e777fe84e1c9ca Author: Masayuki Ishikawa <[email protected]> AuthorDate: Thu Mar 7 15:48:00 2024 +0900 Revert "nuttx/list/queue: add helper macro list/sq/dq_is_singular()" This reverts commit eb6fe17baadfbd909a396dfc8f4ec30c0ddc52bd. --- include/nuttx/list.h | 7 +++---- include/nuttx/queue.h | 8 -------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/include/nuttx/list.h b/include/nuttx/list.h index cadbccc335..b3b4309374 100644 --- a/include/nuttx/list.h +++ b/include/nuttx/list.h @@ -69,10 +69,9 @@ #define LIST_INITIAL_VALUE(list) { &(list), &(list) } #define LIST_INITIAL_CLEARED_VALUE { NULL, NULL } -#define list_in_list(item) ((item)->prev != NULL) -#define list_is_empty(list) ((list)->next == list) -#define list_is_clear(list) ((list)->next == NULL) -#define list_is_singular(list) ((list)->next == (list)->prev) +#define list_in_list(item) ((item)->prev != NULL) +#define list_is_empty(list) ((list)->next == list) +#define list_is_clear(list) ((list)->next == NULL) #define list_initialize(list) \ do \ diff --git a/include/nuttx/queue.h b/include/nuttx/queue.h index 6a07d6a4dc..159f548e49 100644 --- a/include/nuttx/queue.h +++ b/include/nuttx/queue.h @@ -290,14 +290,6 @@ #define dq_inqueue(p, q) \ ((p)->flink || dq_tail(q) == (p)) -/* sq/dq_is_singular - tests whether a list has just one entry. */ - -#define sq_is_singular(q) \ - (!sq_empty(q) && (q)->head->flink == NULL) - -#define dq_is_singular(q) \ - (!dq_empty(q) && (q)->head->flink == NULL) - /**************************************************************************** * Public Type Definitions ****************************************************************************/
