summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-19 17:56:44 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-19 17:56:44 +0200
commit69301c17439d276e1596f76b9a137396b268267b (patch)
tree8d6f62f46fcea7265a2f0cde60edcf3ca33ee501 /src
parentce74e76920dca603a12ef4bf605567965e9e7e45 (diff)
core: sd_bus_error() already checks for NULL, no need to duplicate check
Diffstat (limited to 'src')
-rw-r--r--src/core/transaction.c36
1 files changed, 10 insertions, 26 deletions
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);
}
}
}