From e5c8029e137d422dbf2b3565df49b7a1572de43e Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 9 Feb 2018 16:19:11 +0900 Subject: sd-bus: explicitly convert int to bool --- src/libsystemd/sd-bus/sd-bus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsystemd/sd-bus/sd-bus.c') diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 31c79241fc..5bc7ba6607 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -349,7 +349,7 @@ _public_ int sd_bus_set_monitor(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->is_monitor = b; + bus->is_monitor = !!b; return 0; } @@ -359,7 +359,7 @@ _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->accept_fd = b; + bus->accept_fd = !!b; return 0; } @@ -371,7 +371,7 @@ _public_ int sd_bus_negotiate_timestamp(sd_bus *bus, int b) { /* This is not actually supported by any of our transports these days, but we do honour it for synthetic * replies, and maybe one day classic D-Bus learns this too */ - bus->attach_timestamp = b; + bus->attach_timestamp = !!b; return 0; } @@ -455,7 +455,7 @@ _public_ int sd_bus_set_watch_bind(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->watch_bind = b; + bus->watch_bind = !!b; return 0; } @@ -473,7 +473,7 @@ _public_ int sd_bus_set_connected_signal(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->connected_signal = b; + bus->connected_signal = !!b; return 0; } -- cgit v1.2.1