From 10c238b2cc4a1346bec492ce802fa4e0fa92706d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jan 2020 16:31:40 +0100 Subject: [PATCH] man: clarify that we decode D-Bus bools as "int", not as C99 "bool" Fixes: #14643 --- man/sd_bus_message_read.xml | 8 ++++++++ man/sd_bus_message_read_basic.xml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/man/sd_bus_message_read.xml b/man/sd_bus_message_read.xml index aa3cffb432..2afa441742 100644 --- a/man/sd_bus_message_read.xml +++ b/man/sd_bus_message_read.xml @@ -174,6 +174,14 @@ int64_t x; sd_bus_message_read(m, "x", &x); + Read a boolean value: + + sd_bus_message *m; +int x; /* Do not use C99 'bool' type here, it's typically smaller + in memory and would cause memory corruption */ + +sd_bus_message_read(m, "b", &x); + Read all types of integers: uint8_t y; diff --git a/man/sd_bus_message_read_basic.xml b/man/sd_bus_message_read_basic.xml index 92574f7091..0502976dce 100644 --- a/man/sd_bus_message_read_basic.xml +++ b/man/sd_bus_message_read_basic.xml @@ -93,7 +93,7 @@ b SD_BUS_TYPE_BOOLEAN boolean - int * + int * (NB: not bool *)