OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da35bbc
)
Allow alarm_cancel() on NULL timers
author
Pavlin Radoslavov
<pavlin@google.com>
Thu, 28 Jan 2016 00:03:19 +0000
(16:03 -0800)
committer
Pavlin Radoslavov
<pavlin@google.com>
Thu, 28 Jan 2016 00:03:19 +0000
(16:03 -0800)
Remove an assert that prevents using alarm_cancel() with NULL
timers.
Bug:
26831803
Change-Id: Ifd1476272b13a3f7fd5a0dbb57ee867cbfe2c2bb
osi/src/alarm.c
patch
|
blob
|
history
diff --git
a/osi/src/alarm.c
b/osi/src/alarm.c
index
a00aacc
..
2ccdd4f
100644
(file)
--- a/
osi/src/alarm.c
+++ b/
osi/src/alarm.c
@@
-260,7
+260,8
@@
static void alarm_set_internal(alarm_t *alarm, period_ms_t period,
void alarm_cancel(alarm_t *alarm) {
assert(alarms != NULL);
- assert(alarm != NULL);
+ if (!alarm)
+ return;
pthread_mutex_lock(&monitor);