chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0f99f74
)
terminal: sysview: don't return uninitialized error codes
author
David Herrmann
<dh.herrmann@gmail.com>
Thu, 28 Aug 2014 09:01:31 +0000
(11:01 +0200)
committer
David Herrmann
<dh.herrmann@gmail.com>
Thu, 28 Aug 2014 09:04:18 +0000
(11:04 +0200)
In case 'scan_evdev' and 'scan_drm' are both false, we never set 'r' to
anyhting, thus return an uninitialized error code. Fix this by always
returning 0 as we catch negative codes earlier, anyway. Thanks to Thomas
H.P. Anderson for the report.
src/libsystemd-terminal/sysview.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-terminal/sysview.c
b/src/libsystemd-terminal/sysview.c
index d885cb4d4aee722e2764df158bfc2560c1dfd4c1..f5363dedf403421f39bf1e46cc4f52d6f8d73c5d 100644
(file)
--- a/
src/libsystemd-terminal/sysview.c
+++ b/
src/libsystemd-terminal/sysview.c
@@
-821,7
+821,7
@@
static int context_ud_prepare_monitor(sysview_context *c, struct udev_monitor *m
return r;
}
- return
r
;
+ return
0
;
}
static int context_ud_prepare_scan(sysview_context *c, struct udev_enumerate *e) {