remove always true assertions (fix #83)

This commit is contained in:
graham sanderson 2021-02-17 14:38:25 -06:00 committed by Luke Wren
parent ffc7f19f46
commit 01c8e2a8dc
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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;