You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/08/02 15:50:54 UTC
[incubator-nuttx] 02/02: list: Remove the unnecessary ? : operator
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 306431d16f489f9956826f3d0599d9354e28b51a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 29 10:55:37 2022 +0800
list: Remove the unnecessary ? : operator
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
include/nuttx/list.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/nuttx/list.h b/include/nuttx/list.h
index bbeb16e541..8081da31db 100644
--- a/include/nuttx/list.h
+++ b/include/nuttx/list.h
@@ -387,12 +387,12 @@ list_next_wrap(FAR struct list_node *list, FAR struct list_node *item)
static inline bool list_is_empty(FAR struct list_node *list)
{
- return (list->next == list) ? true : false;
+ return list->next == list;
}
static inline bool list_is_clear(FAR struct list_node *list)
{
- return (list->next == NULL) ? true : false;
+ return list->next == NULL;
}
static inline size_t list_length(FAR struct list_node *list)