|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From c2fa048c4a70c8386c6d8fe939e5ea9edecf1e98 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: David Herrmann <dh.herrmann@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Thu, 18 Sep 2014 13:28:28 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] bus: fix bus_print_property() to use "int" for booleans
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
We always use "int" if we retrieve boolean values from sd-bus, as "bool"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
is only a single byte, but full int on va-args.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Thanks to Werner Fink for the report!
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libsystemd/sd-bus/bus-util.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 7c6da60cca..9018bcee5c 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libsystemd/sd-bus/bus-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libsystemd/sd-bus/bus-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -631,7 +631,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
case SD_BUS_TYPE_BOOLEAN: {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- bool b;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ int b;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
r = sd_bus_message_read_basic(property, type, &b);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (r < 0)
|