mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
overwrite stored names & link keys if no place remained
This commit is contained in:
parent
31b7540338
commit
32046991c1
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <btstack/linked_list.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
/**
|
||||
* tests if list is empty
|
||||
*/
|
||||
@ -44,6 +44,21 @@ int linked_list_empty(linked_list_t * list){
|
||||
return *list == (void *) 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* linked_list_get_last_item
|
||||
*/
|
||||
linked_item_t * linked_list_get_last_item(linked_list_t * list){ // <-- find the last item in the list
|
||||
linked_item_t *lastItem = NULL;
|
||||
linked_item_t *it;
|
||||
for (it = *list; it ; it = it->next){
|
||||
if (it) {
|
||||
lastItem = it;
|
||||
}
|
||||
}
|
||||
return lastItem;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* linked_list_add
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user