From ae978b9f6c8b8e617cc00e232aebf2c220e17688 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 31 Aug 2017 17:02:33 +0900 Subject: [PATCH] bus-util: remove unnecessary initializations --- src/core/dbus-execute.c | 2 +- src/shared/bus-util.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index ac7cd7f..eb0af24 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -1917,7 +1917,7 @@ int bus_exec_context_set_transient_property( return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Path %s is not absolute.", path); if (mode != UNIT_CHECK) { - char *buf = NULL; + char *buf; buf = strjoin(b ? "-" : "", path); if (!buf) diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index ea29e1c..48752c5 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -734,7 +734,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool value, b print_property(name, "%s", format_timespan(timespan, sizeof(timespan), u, 0)); } else if (streq(name, "RestrictNamespaces")) { _cleanup_free_ char *s = NULL; - const char *result = NULL; + const char *result; if ((u & NAMESPACE_FLAGS_ALL) == 0) result = "yes"; @@ -751,7 +751,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool value, b print_property(name, "%s", result); } else if (streq(name, "MountFlags")) { - const char *result = NULL; + const char *result; result = mount_propagation_flags_to_string(u); if (!result) -- 2.7.4