summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-08-28 11:01:31 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-08-28 11:04:18 +0200
commit371ad55d460559b4262e25d0f9b64dc37c3f7565 (patch)
treea8a24b7c6356539fe9b25048d5ab7c35b18d71b3 /src/libsystemd-terminal
parent0f99f74a14ef193c1ebde687c5cc76e1d67b85ef (diff)
terminal: sysview: don't return uninitialized error codes
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.
Diffstat (limited to 'src/libsystemd-terminal')
-rw-r--r--src/libsystemd-terminal/sysview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c
index d885cb4d4a..f5363dedf4 100644
--- 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) {