projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf2ab16
)
core: fix the return value of gpiod_simple_event_loop()
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Tue, 2 May 2017 21:58:43 +0000
(23:58 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Wed, 3 May 2017 06:53:00 +0000
(08:53 +0200)
This routine should always return 0 when no errors were encountered.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/lib/core.c
patch
|
blob
|
history
diff --git
a/src/lib/core.c
b/src/lib/core.c
index cefa9859c3230c51882b921a5e42ff628faf2342..1d46a041c6467b217bd1e272ac262af958d46587 100644
(file)
--- a/
src/lib/core.c
+++ b/
src/lib/core.c
@@
-314,8
+314,10
@@
int gpiod_simple_event_loop(const char *consumer, const char *device,
}
status = callback(evtype, &event.ts, cbdata);
- if (status == GPIOD_EVENT_CB_STOP)
+ if (status == GPIOD_EVENT_CB_STOP) {
+ status = 0;
goto out;
+ }
}
out: