summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-05-08 11:09:10 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-10 14:43:10 +0100
commit170d40260ba4484726d247b679089a394b5ffcf6 (patch)
tree16f7aecad3ad20dba790a42dfed0343fd430b3d0
parenttest-tables: make the assert more readable (diff)
downloadsystemd-170d40260ba4484726d247b679089a394b5ffcf6.tar.xz
systemd-170d40260ba4484726d247b679089a394b5ffcf6.zip
core: do not initialize variable which is unconditionally set below
-rw-r--r--src/core/dbus-timer.c2
-rw-r--r--src/core/dbus-unit.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
index 8e69c17327..88b2f2cacf 100644
--- a/src/core/dbus-timer.c
+++ b/src/core/dbus-timer.c
@@ -338,7 +338,7 @@ static int bus_timer_set_transient_property(
b = timer_base_from_string(name);
if (b < 0)
- return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown timer base");
+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown timer base %s", name);
r = sd_bus_message_read(message, "t", &usec);
if (r < 0)
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 67cc58ee9e..90bf5514a3 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -1982,7 +1982,7 @@ static int bus_unit_set_transient_property(
UnitWriteFlags flags,
sd_bus_error *error) {
- UnitDependency d = _UNIT_DEPENDENCY_INVALID;
+ UnitDependency d;
int r;
assert(u);