AP_HAL_AVR: Do not compare delegate to NULL

Use the simpler "if (delegate_name)" since it allows simpler
implementation in the class, i.e. the bool operator rather than having
to compare to another object.
This commit is contained in:
Lucas De Marchi 2015-05-24 07:37:31 -03:00 committed by Andrew Tridgell
parent 57386434d1
commit 9ef870c08a

View File

@ -197,7 +197,7 @@ void AVRScheduler::_run_timer_procs(bool called_from_isr) {
if (!_timer_suspended) {
// now call the timer based drivers
for (int i = 0; i < _num_timer_procs; i++) {
if (_timer_proc[i] != NULL) {
if (_timer_proc[i]) {
_timer_proc[i]();
}
}