summaryrefslogtreecommitdiff
path: root/src/update-utmp
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-08-17 10:45:30 +0200
committerMarkus Elfring <elfring@users.sourceforge.net>2015-08-17 10:45:30 +0200
commit3e044c492e3ebe64f4e3175c94f9db8a62557b82 (patch)
tree162e76658ef1e646546eca079d08e0143c4747b6 /src/update-utmp
parentdc4ebc0787a299f064553e6d28a7f35574ce1c2a (diff)
downloadsystemd-3e044c492e3ebe64f4e3175c94f9db8a62557b82.tar.gz
Bug #944: Deletion of unnecessary checks before a few calls of systemd functions
The following functions return immediately if a null pointer was passed. * calendar_spec_free * link_address_free * manager_free * sd_bus_unref * sd_journal_close * udev_monitor_unref * udev_unref It is therefore not needed that a function caller repeats a corresponding check. This issue was fixed by using the software Coccinelle 1.0.1.
Diffstat (limited to 'src/update-utmp')
-rw-r--r--src/update-utmp/update-utmp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
index ea9b0c9c84..61bcf02b2f 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/update-utmp/update-utmp.c
@@ -286,8 +286,6 @@ finish:
audit_close(c.audit_fd);
#endif
- if (c.bus)
- sd_bus_unref(c.bus);
-
+ sd_bus_unref(c.bus);
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}