Merge pull request #976 from elfring/Remove_unnecessary_checks2

Delete unnecessary checks before some function calls
This commit is contained in:
Lennart Poettering
2015-08-17 11:30:31 +02:00
12 changed files with 20 additions and 46 deletions
+1 -5
View File
@@ -143,11 +143,7 @@ static void message_free(sd_bus_message *m) {
if (m->iovec != m->iovec_fixed)
free(m->iovec);
if (m->destination_ptr) {
free(m->destination_ptr);
m->destination_ptr = NULL;
}
m->destination_ptr = mfree(m->destination_ptr);
message_reset_containers(m);
free(m->root_container.signature);
free(m->root_container.offsets);
+1 -3
View File
@@ -118,9 +118,7 @@ static int server_init(sd_bus **_bus) {
return 0;
fail:
if (bus)
sd_bus_unref(bus);
sd_bus_unref(bus);
return r;
}