Similar to list_is_singular() in util/list.h.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
return list->head_sentinel.next == &list->tail_sentinel;
}
+static inline bool
+exec_list_is_singular(const struct exec_list *list)
+{
+ return !exec_list_is_empty(list) &&
+ list->head_sentinel.next->next == &list->tail_sentinel;
+}
+
static inline const struct exec_node *
exec_list_get_head_const(const struct exec_list *list)
{