[systemd-commits] src/libsystemd

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Tue Sep 23 12:39:49 PDT 2014


 src/libsystemd/sd-bus/bus-error.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04c553e322680b6fcdf5b271e84b0b4b0ad8d5f9
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Sep 23 21:34:21 2014 +0200

    bus: remove unused check
    
    strerror_r does not return null here and even if it did we would have
    problems already at the preceding strlen call.
    
    Found by coverity. Fixes: CID#1237770

diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
index c2e41fb..abdfd73 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -312,7 +312,7 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
                         continue;
                 }
 
-                if (!x || errno) {
+                if (errno) {
                         free(m);
                         return;
                 }



More information about the systemd-commits mailing list