summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/bus-dump.c2
-rw-r--r--src/shared/util.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-dump.c b/src/libsystemd-bus/bus-dump.c
index ddad4183a2..7b614792ca 100644
--- a/src/libsystemd-bus/bus-dump.c
+++ b/src/libsystemd-bus/bus-dump.c
@@ -200,7 +200,7 @@ int bus_message_dump(sd_bus_message *m, FILE *f, bool with_header) {
break;
case SD_BUS_TYPE_BOOLEAN:
- fprintf(f, "%sBOOLEAN %s%s%s;\n", prefix, ansi_highlight(), yes_no(basic.i), ansi_highlight_off());
+ fprintf(f, "%sBOOLEAN %s%s%s;\n", prefix, ansi_highlight(), true_false(basic.i), ansi_highlight_off());
break;
case SD_BUS_TYPE_INT16:
diff --git a/src/shared/util.h b/src/shared/util.h
index dd51e89306..1d178260cb 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -92,6 +92,10 @@ static inline const char* yes_no(bool b) {
return b ? "yes" : "no";
}
+static inline const char* true_false(bool b) {
+ return b ? "true" : "false";
+}
+
static inline const char* strempty(const char *s) {
return s ? s : "";
}