/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2020 Broadcom
+ * Copyright(c) 2019-2021 Broadcom
* All rights reserved.
*/
return 0;
}
+/*
+ * Return the address of the items
+ */
+uint32_t *stack_items(struct stack *st)
+{
+ return st->items;
+}
+
/* Return the size of the stack
*/
int32_t
stack_pop(struct stack *st, uint32_t *x)
{
if (stack_is_empty(st))
- return -ENODATA;
+ return -ENOENT;
*x = st->items[st->top];
st->top--;