From 3e044c492e3ebe64f4e3175c94f9db8a62557b82 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Mon, 17 Aug 2015 10:45:30 +0200 Subject: 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. --- src/journal-remote/journal-gatewayd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/journal-remote') diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c index 1eb07a1681..ebdd9edfc3 100644 --- a/src/journal-remote/journal-gatewayd.c +++ b/src/journal-remote/journal-gatewayd.c @@ -103,8 +103,7 @@ static void request_meta_free( if (!m) return; - if (m->journal) - sd_journal_close(m->journal); + sd_journal_close(m->journal); if (m->tmp) fclose(m->tmp); -- cgit v1.2.3-54-g00ecf