diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2015-04-07 19:34:40 +0200 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2015-04-07 21:11:38 +0200 |
commit | 2bb9e6203dc329f69a7180431d1b61f4e9529afa (patch) | |
tree | f6f1a9f65cdf39994325cc764030e2f058cc3ccb | |
parent | 889f25b2ccea77770e62220ecf65a6799794bfa2 (diff) |
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.
-rw-r--r-- | src/core/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/device.c b/src/core/device.c index b5d9d827e2..dca2a82256 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; |