[systemd-commits] src/core

Lennart Poettering lennart at kemper.freedesktop.org
Tue May 19 08:57:04 PDT 2015


 src/core/transaction.c |   36 ++++++++++--------------------------
 1 file changed, 10 insertions(+), 26 deletions(-)

New commits:
commit 69301c17439d276e1596f76b9a137396b268267b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue May 19 17:56:44 2015 +0200

    core: sd_bus_error() already checks for NULL, no need to duplicate check

diff --git a/src/core/transaction.c b/src/core/transaction.c
index 223f691..9817057 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);
                                 }
                         }
                 }



More information about the systemd-commits mailing list