projects
/
platform
/
core
/
system
/
deviced.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46c79d6
)
haptic: change return value check routine of open()
19/63719/1
author
Taeyoung Kim
<ty317.kim@samsung.com>
Fri, 25 Mar 2016 09:20:37 +0000
(18:20 +0900)
committer
Taeyoung Kim
<ty317.kim@samsung.com>
Fri, 25 Mar 2016 09:20:37 +0000
(18:20 +0900)
- open() returns -1 when error is occurred. Thus
*fd can have negative value. This is fixed
by checking the value correctly
Change-Id: I2482b86612ca6b76fc799b87fdd82216d8b743d8
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
src/haptic/standard.c
patch
|
blob
|
history
diff --git
a/src/haptic/standard.c
b/src/haptic/standard.c
index
251cc91
..
16d64f6
100644
(file)
--- a/
src/haptic/standard.c
+++ b/
src/haptic/standard.c
@@
-121,7
+121,7
@@
static bool check_fd(int *fd)
return true;
ffd = open(ff_path, O_RDWR);
- if (
!ffd
)
+ if (
ffd <= 0
)
return false;
*fd = ffd;