chiark / gitweb /
bus-util: remove unnecessary initializations
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 31 Aug 2017 08:02:33 +0000 (17:02 +0900)
committerSven Eden <yamakuzure@gmx.net>
Thu, 31 Aug 2017 08:02:33 +0000 (17:02 +0900)
src/shared/bus-util.c

index 69bbf5782692054206879b32d4c12019c28d1bf7..33ab89b2333bd4b304bd17f13ee5052c5cde0865 100644 (file)
@@ -738,7 +738,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";
@@ -755,7 +755,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)