summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/alist.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/alist.h b/include/alist.h
index 586a1efa5c8..68d268f01af 100644
--- a/include/alist.h
+++ b/include/alist.h
@@ -83,6 +83,17 @@ static inline bool alist_err(struct alist *lst)
}
/**
+ * alist_full() - Check if the alist is full
+ *
+ * @lst: List to check
+ * Return: true if full, false otherwise
+ */
+static inline bool alist_full(struct alist *lst)
+{
+ return lst->count == lst->alloc;
+}
+
+/**
* alist_get_ptr() - Get the value of a pointer
*
* @lst: alist to check