diff options
author | Timothy Arceri <[email protected]> | 2019-10-28 21:27:52 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-10-28 11:24:38 +0000 |
commit | 7f106a2b5d0b27c1ce47a4b335c4cc8ae9cd460b (patch) | |
tree | 1307edca18a23a59f1a50d2bcc41d054a7453676 /src/util | |
parent | c578600489e35abb481816c87124b1dc6b279655 (diff) |
util: rename list_empty() to list_is_empty()
This makes it clear that it's a boolean test and not an action
(eg. "empty the list").
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/list.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/list.h b/src/util/list.h index a4502285f8c..7165f15f4ec 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -77,11 +77,11 @@ static inline void list_addtail(struct list_head *item, struct list_head *list) list->prev = item; } -static inline bool list_empty(const struct list_head *list); +static inline bool list_is_empty(const struct list_head *list); static inline void list_replace(struct list_head *from, struct list_head *to) { - if (list_empty(from)) { + if (list_is_empty(from)) { list_inithead(to); } else { to->prev = from->prev; @@ -106,7 +106,7 @@ static inline void list_delinit(struct list_head *item) item->prev = item; } -static inline bool list_empty(const struct list_head *list) +static inline bool list_is_empty(const struct list_head *list) { return list->next == list; } @@ -130,7 +130,7 @@ static inline unsigned list_length(const struct list_head *list) static inline void list_splice(struct list_head *src, struct list_head *dst) { - if (list_empty(src)) + if (list_is_empty(src)) return; src->next->prev = dst; @@ -141,7 +141,7 @@ static inline void list_splice(struct list_head *src, struct list_head *dst) static inline void list_splicetail(struct list_head *src, struct list_head *dst) { - if (list_empty(src)) + if (list_is_empty(src)) return; src->prev->next = dst; |