mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-12 15:47:14 +00:00
added linked_list_empty
This commit is contained in:
parent
6218e6f12b
commit
6a38fc08d9
@ -46,6 +46,7 @@ typedef linked_item_t * linked_list_t;
|
||||
|
||||
void linked_item_set_user(linked_item_t *item, void *user_data); // <-- set user data
|
||||
void * linked_item_get_user(linked_item_t *item); // <-- get user data
|
||||
int linked_list_empty(linked_list_t * list);
|
||||
void linked_list_add(linked_list_t * list, linked_item_t *item); // <-- add item to list as first element
|
||||
void linked_list_add_tail(linked_list_t * list, linked_item_t *item); // <-- add item to list as last element
|
||||
int linked_list_remove(linked_list_t * list, linked_item_t *item); // <-- remove item from list
|
||||
|
@ -37,6 +37,13 @@
|
||||
|
||||
#include <btstack/linked_list.h>
|
||||
|
||||
/**
|
||||
* tests if list is empty
|
||||
*/
|
||||
int linked_list_empty(linked_list_t * list){
|
||||
return *list == (void *) 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* linked_list_add
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user