From 01c8e2a8dc9f670d473f672c5351dfeb524ff6ae Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Wed, 17 Feb 2021 14:38:25 -0600 Subject: [PATCH] remove always true assertions (fix #83) --- src/common/pico_sync/lock_core.c | 2 +- src/rp2_common/hardware_sync/sync.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/pico_sync/lock_core.c b/src/common/pico_sync/lock_core.c index cf53a05..20cc959 100644 --- a/src/common/pico_sync/lock_core.c +++ b/src/common/pico_sync/lock_core.c @@ -7,7 +7,7 @@ #include "pico/lock_core.h" void lock_init(lock_core_t *core, uint lock_num) { - assert(lock_num >= 0 && lock_num < NUM_SPIN_LOCKS); + assert(lock_num < NUM_SPIN_LOCKS); core->spin_lock = spin_lock_instance(lock_num); } diff --git a/src/rp2_common/hardware_sync/sync.c b/src/rp2_common/hardware_sync/sync.c index dba040a..c032a27 100644 --- a/src/rp2_common/hardware_sync/sync.c +++ b/src/rp2_common/hardware_sync/sync.c @@ -22,7 +22,7 @@ void spin_locks_reset(void) { } spin_lock_t *spin_lock_init(uint lock_num) { - assert(lock_num >= 0 && lock_num < NUM_SPIN_LOCKS); + assert(lock_num < NUM_SPIN_LOCKS); spin_lock_t *lock = spin_lock_instance(lock_num); spin_unlock_unsafe(lock); return lock;