[systemd-commits] src/libsystemd-terminal

David Herrmann dvdhrm at kemper.freedesktop.org
Thu Aug 28 02:07:31 PDT 2014


 src/libsystemd-terminal/sysview.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 371ad55d460559b4262e25d0f9b64dc37c3f7565
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Aug 28 11:01:31 2014 +0200

    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.

diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c
index d885cb4..f5363de 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) {



More information about the systemd-commits mailing list