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.
This commit is contained in:
Markus Elfring
2015-08-17 10:45:30 +02:00
parent dc4ebc0787
commit 3e044c492e
9 changed files with 14 additions and 32 deletions
+1 -4
View File
@@ -56,10 +56,7 @@ void timer_free_values(Timer *t) {
while ((v = t->values)) {
LIST_REMOVE(value, t->values, v);
if (v->calendar_spec)
calendar_spec_free(v->calendar_spec);
calendar_spec_free(v->calendar_spec);
free(v);
}
}