mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 11:55:03 +00: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:
parent
30e331e9cb
commit
c4eced2ec0
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue