chiark / gitweb /
property callback returns are consistent
authorUmut Tezduyar Lindskog <umuttl@axis.com>
Wed, 8 Jul 2015 12:35:32 +0000 (14:35 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:06:01 +0000 (10:06 +0100)
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.

src/login/logind-user-dbus.c

index 0f72d70b103c344a3948b6e402171f93facc2b8c..36c0e8626dd2e206477c51504a0e1f211b50c91a 100644 (file)
@@ -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(