[systemd-commits] src/core

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Tue Apr 7 12:11:42 PDT 2015


 src/core/device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2bb9e6203dc329f69a7180431d1b61f4e9529afa
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Apr 7 19:34:40 2015 +0200

    device: remove unused null check
    
    We dereference the variable right before the null check. We never reach
    this point with a null value anyway so let's just remove it.

diff --git a/src/core/device.c b/src/core/device.c
index b5d9d82..dca2a82 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -325,7 +325,7 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa
 fail:
         log_unit_warning_errno(u->id, r, "Failed to set up device unit: %m");
 
-        if (delete && u)
+        if (delete)
                 unit_free(u);
 
         return r;



More information about the systemd-commits mailing list