chiark / gitweb /
timedatectl: assorted simplifications
[elogind.git] / src / libsystemd-bus / bus-util.c
index e62ea6a877ce85cdb1a6241596882bec703f6351..063228877622888940e25d1e042ede435307aebf 100644 (file)
@@ -534,12 +534,12 @@ int bus_generic_print_property(const char *name, sd_bus_message *property, bool
 
                         sd_bus_message_peek_type(property, &tp, &cnt);
                         if (all || cnt) {
-                               const char *str;
+                                const char *str;
 
                                 printf("%s=", name);
 
 
-                                while(sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str)) {
+                                while(sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str) > 0) {
                                         printf("%s%s", space ? " " : "", str);
 
                                         space = true;