projects
/
platform
/
core
/
system
/
sensord.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc67ca3
)
sensord: return false if the size of id is 0
92/89192/2
author
kibak.yoon
<kibak.yoon@samsung.com>
Mon, 18 Jul 2016 11:19:11 +0000
(20:19 +0900)
committer
kibak.yoon
<kibak.yoon@samsung.com>
Fri, 23 Sep 2016 06:26:44 +0000
(15:26 +0900)
- If the size of ids is zero, it doesn't need to process the next works.
- It doesn't make a problem although it is not fixed.
but it would be better to reduce the unnecessary work.
Change-Id: I2187d738ee90bae47cb4276b39b5651afa771b97
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/server/physical_sensor.cpp
patch
|
blob
|
history
diff --git
a/src/server/physical_sensor.cpp
b/src/server/physical_sensor.cpp
index
fc16b7b
..
65ab74e
100644
(file)
--- a/
src/server/physical_sensor.cpp
+++ b/
src/server/physical_sensor.cpp
@@
-94,6
+94,9
@@
bool physical_sensor::read_fd(std::vector<uint32_t> &ids)
size = m_sensor_device->read_fd(&_ids);
+ if (size == 0)
+ return false;
+
for (int i = 0; i < size; ++i)
ids.push_back(_ids[i]);