mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
Merge pull request #516 from utezduyar/consistent-get-callback-return
property callback returns are consistent
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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[] = {
|
||||
|
||||
Reference in New Issue
Block a user