1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/ztimer64: make _del_entry_from_list() safe for uninit ztimer64_t

This commit is contained in:
Kaspar Schleiser 2021-12-09 13:40:21 +01:00
parent ccc97db715
commit 7b9a6850a3

View File

@ -128,6 +128,9 @@ static int _add_entry_to_list(ztimer64_clock_t *clock, ztimer64_base_t *entry)
static int _del_entry_from_list(ztimer64_clock_t *clock, ztimer64_base_t *entry)
{
DEBUG("_del_entry_from_list()\n");
if (!clock->first) {
return 0;
}
assert(_is_set((ztimer64_t *)entry));
if (clock->first == entry) {
/* special case: removing first entry */