diff options
Diffstat (limited to 'lib/list_util.h')
-rw-r--r-- | lib/list_util.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/list_util.h b/lib/list_util.h index 876b7b11..f6a01d93 100644 --- a/lib/list_util.h +++ b/lib/list_util.h @@ -22,12 +22,7 @@ #ifndef _ZEBRA_LIST_UTIL_H #define _ZEBRA_LIST_UTIL_H -#include <stddef.h> - -/* Macro in case there are particular compiler issues. */ -#ifndef Inline - #define Inline static inline -#endif +#include "misc.h" /*------------------------------------------------------------------------------ * Note that the following fell foul of "strict-aliasing": @@ -47,7 +42,7 @@ * } ; * * the assignment to *p_base is, apparently, unacceptable. This works - * perfectly well as am ordinary function. Using a GNUC extension it is + * perfectly well as an ordinary function. Using a GNUC extension it is * possible to avoid the function call... hence the ugly skips. */ #ifdef __GNUC__ @@ -138,10 +133,10 @@ struct dl_void_base_pair base_pair(void*) ; * * ssl_del(base, item, next) -- delete from list * - * Treat as function returning int. Does nothing if the item is NULL. + * Treat as function returning bool. Does nothing if the item is NULL. * - * Returns: 0 => OK -- removed item from list (OR item == NULL) - * -1 => item not found on list + * Returns: true => removed item from list + * false => item not found on list (or item was NULL) * * ssl_del_head(base, next) -- delete head of list * @@ -242,7 +237,7 @@ struct dl_void_base_pair base_pair(void*) ; (base) = item ; \ } while (0) -extern int ssl_del_func(void* p_this, void* obj, size_t link_offset) +extern bool ssl_del_func(void* p_this, void* obj, size_t link_offset) __attribute__((noinline)) ; #define ssl_del(base, item, next) \ @@ -511,7 +506,7 @@ extern int ssl_del_func(void* p_this, void* obj, size_t link_offset) * * Treat as function returning void*. * - * Returns old head in dst and as return from "function". + * Returns old tail in dst and as return from "function". * * Returns NULL and sets dst == NULL if list is empty. * |