mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 10:56:02 +01:00
alist: add a helper to check if the list is full
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>
This commit is contained in:
@@ -82,6 +82,17 @@ static inline bool alist_err(struct alist *lst)
|
||||
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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user