projects
/
platform
/
core
/
api
/
zigbee.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
807b2fc
)
Fix range check logic
author
Jiwan Kim
<ji-wan.kim@samsung.com>
Tue, 2 May 2017 05:29:57 +0000
(14:29 +0900)
committer
saerome.kim
<saerome.kim@samsung.com>
Thu, 11 May 2017 09:07:21 +0000
(18:07 +0900)
Change-Id: Ic48f8c37a620fb422c9c1a7abdcaa54932ed9522
Signed-off-by: Jiwan Kim <ji-wan.kim@samsung.com>
lib/zbl_zcl.c
patch
|
blob
|
history
diff --git
a/lib/zbl_zcl.c
b/lib/zbl_zcl.c
index 89f78df6c36313bf6bbe5ebdb50f2646bdaa29ce..fda930379fd63a61f71f5a31fa5e7f7b14a5a9aa 100644
(file)
--- a/
lib/zbl_zcl.c
+++ b/
lib/zbl_zcl.c
@@
-409,9
+409,12
@@
static unsigned char analog_discrete_thresholds[] = {
API int zb_get_analog_or_discret(unsigned char type)
{
int index = 0;
+ unsigned char var = analog_discrete_thresholds[index];
- while (
analog_discrete_thresholds[index] < type)
+ while (
var < type && var < 0xFF) {
index += 2;
+ var = analog_discrete_thresholds[index];
+ }
return analog_discrete_thresholds[index+1];
}