Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5dbfc3e9 authored by Stanley Tng's avatar Stanley Tng Committed by android-build-merger
Browse files

Merge "Assert if alarm callback is null" am: c0e9ae39

am: 7b3cbd16

Change-Id: I46dbff26e2c350adeb19eb4efce36feed78d0b7f
parents d42bc323 7b3cbd16
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -561,11 +561,16 @@ static void alarm_ready_generic(alarm_t* alarm,
  if (alarm == NULL) {
    return;  // The alarm was probably canceled
  }

  //
  // If the alarm is not periodic, we've fully serviced it now, and can reset
  // some of its internal state. This is useful to distinguish between expired
  // alarms and active ones.
  //
  if (!alarm->callback) {
    LOG(FATAL) << __func__
               << ": timer callback is NULL! Name=" << alarm->stats.name;
  }
  alarm_callback_t callback = alarm->callback;
  void* data = alarm->data;
  uint64_t deadline_ms = alarm->deadline_ms;