diff options
author | Umut Tezduyar Lindskog <umuttl@axis.com> | 2015-07-08 14:35:32 +0200 |
---|---|---|
committer | Umut Tezduyar Lindskog <umuttl@axis.com> | 2015-07-08 14:37:25 +0200 |
commit | 0f8261015380be71f8a63c8aa37926c2a32d1870 (patch) | |
tree | 8a3b0f0c48b9ea17c51d47c96031fa3ef3013bd6 /src/machine/machine-dbus.c | |
parent | 9a50ce20ef60263a6c88c29470ce761fcc424f2d (diff) |
property callback returns are consistent
It is no different to return 0 over 1 in the property
callback. It is confusing to return 1 which made me think
1 has a special purpose. This way code is consistent with
the rest of the tree.
Diffstat (limited to 'src/machine/machine-dbus.c')
-rw-r--r-- | src/machine/machine-dbus.c | 12 |
1 files changed, 2 insertions, 10 deletions
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); |