Add a helper function to check if the alist is full. This can then be
used to extend the alist.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
return lst->flags & ALISTF_FAIL;
}
+/**
+ * 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
*