diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-brightness.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/login/logind-brightness.c b/src/login/logind-brightness.c index 3f4b65e1fd..5c0c55fc36 100644 --- a/src/login/logind-brightness.c +++ b/src/login/logind-brightness.c @@ -174,15 +174,12 @@ static int set_add_message(Set **set, sd_bus_message *message) { if (r <= 0) return r; - r = set_ensure_allocated(set, &bus_message_hash_ops); - if (r < 0) - return r; - - r = set_put(*set, message); + r = set_ensure_put(set, &bus_message_hash_ops, message); if (r < 0) return r; sd_bus_message_ref(message); + return 1; } |