From 69301c17439d276e1596f76b9a137396b268267b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 May 2015 17:56:44 +0200 Subject: core: sd_bus_error() already checks for NULL, no need to duplicate check --- src/core/transaction.c | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) (limited to 'src/core/transaction.c') diff --git a/src/core/transaction.c b/src/core/transaction.c index 223f691534..9817057185 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -921,9 +921,7 @@ int transaction_add_job_and_dependencies( r = transaction_add_job_and_dependencies(tr, type, dep, ret, false, override, false, false, ignore_order, e); if (r < 0) { log_unit_warning(dep, "Cannot add dependency job for, ignoring: %s", bus_error_message(e, r)); - - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -938,8 +936,7 @@ int transaction_add_job_and_dependencies( if (r != -EBADR) goto fail; - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -949,8 +946,7 @@ int transaction_add_job_and_dependencies( if (r != -EBADR) goto fail; - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -961,9 +957,7 @@ int transaction_add_job_and_dependencies( r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r, "Cannot add dependency job, ignoring: %s", bus_error_message(e, r)); - - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -974,9 +968,7 @@ int transaction_add_job_and_dependencies( r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r, "Cannot add dependency job, ignoring: %s", bus_error_message(e, r)); - - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -986,8 +978,7 @@ int transaction_add_job_and_dependencies( if (r != -EBADR) goto fail; - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -998,9 +989,7 @@ int transaction_add_job_and_dependencies( r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r, "Cannot add dependency job, ignoring: %s", bus_error_message(e, r)); - - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -1010,8 +999,7 @@ int transaction_add_job_and_dependencies( if (r != -EBADR) goto fail; - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -1021,9 +1009,7 @@ int transaction_add_job_and_dependencies( log_unit_warning(dep, "Cannot add dependency job, ignoring: %s", bus_error_message(e, r)); - - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } @@ -1060,9 +1046,7 @@ int transaction_add_job_and_dependencies( log_unit_warning(dep, "Cannot add dependency reload job, ignoring: %s", bus_error_message(e, r)); - - if (e) - sd_bus_error_free(e); + sd_bus_error_free(e); } } } -- cgit v1.2.3