HAL_PX4: fixed functor comparison with NULL

This commit is contained in:
Andrew Tridgell 2015-05-26 13:54:38 +10:00
parent 0daeeb9518
commit 43fb1202f2

View File

@ -255,7 +255,7 @@ void PX4Scheduler::_run_timers(bool called_from_timer_thread)
if (!_timer_suspended) { if (!_timer_suspended) {
// now call the timer based drivers // now call the timer based drivers
for (int i = 0; i < _num_timer_procs; i++) { for (int i = 0; i < _num_timer_procs; i++) {
if (_timer_proc[i] != NULL) { if (_timer_proc[i]) {
_timer_proc[i](); _timer_proc[i]();
} }
} }
@ -315,7 +315,7 @@ void PX4Scheduler::_run_io(void)
if (!_timer_suspended) { if (!_timer_suspended) {
// now call the IO based drivers // now call the IO based drivers
for (int i = 0; i < _num_io_procs; i++) { for (int i = 0; i < _num_io_procs; i++) {
if (_io_proc[i] != NULL) { if (_io_proc[i]) {
_io_proc[i](); _io_proc[i]();
} }
} }