diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-08 17:24:20 -0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-08 17:24:20 -0300 |
commit | 593b07d25d31132ce2fc673bb607a17084e1afd6 (patch) | |
tree | 7f475c589e0ce71882e63478b0e1e63190608931 /src | |
parent | 1434eb3838581f8ee1cef1f15ce9bcd45398183c (diff) | |
parent | 0f8261015380be71f8a63c8aa37926c2a32d1870 (diff) |
Merge pull request #516 from utezduyar/consistent-get-callback-return
property callback returns are consistent
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind-user-dbus.c | 6 | ||||
-rw-r--r-- | src/machine/machine-dbus.c | 12 | ||||
-rw-r--r-- | src/network/networkd-network-bus.c | 6 |
3 files changed, 4 insertions, 20 deletions
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c index 0f72d70b10..36c0e8626d 100644 --- a/src/login/logind-user-dbus.c +++ b/src/login/logind-user-dbus.c @@ -103,11 +103,7 @@ static int property_get_sessions( } - r = sd_bus_message_close_container(reply); - if (r < 0) - return r; - - return 1; + return sd_bus_message_close_container(reply); } static int property_get_idle_hint( diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 7813a0bcc7..38a4c7b0e7 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -61,11 +61,7 @@ static int property_get_id( assert(reply); assert(m); - r = sd_bus_message_append_array(reply, 'y', &m->id, 16); - if (r < 0) - return r; - - return 1; + return sd_bus_message_append_array(reply, 'y', &m->id, 16); } static int property_get_state( @@ -112,11 +108,7 @@ static int property_get_netif( assert_cc(sizeof(int) == sizeof(int32_t)); - r = sd_bus_message_append_array(reply, 'i', m->netif, m->n_netif * sizeof(int)); - if (r < 0) - return r; - - return 1; + return sd_bus_message_append_array(reply, 'i', m->netif, m->n_netif * sizeof(int)); } static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_class, machine_class, MachineClass); diff --git a/src/network/networkd-network-bus.c b/src/network/networkd-network-bus.c index b5f8f5cfb2..5717a15327 100644 --- a/src/network/networkd-network-bus.c +++ b/src/network/networkd-network-bus.c @@ -53,11 +53,7 @@ static int property_get_ether_addrs( return r; } - r = sd_bus_message_close_container(reply); - if (r < 0) - return r; - - return 1; + return sd_bus_message_close_container(reply); } const sd_bus_vtable network_vtable[] = { |