[vlc-commits] dbus_screensaver: remove bogus error

Rémi Denis-Courmont git at videolan.org
Fri Dec 7 21:26:04 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec  7 22:22:26 2012 +0200| [dfc527fe329f6cbe997af963e864420f28af588b] | committer: Rémi Denis-Courmont

dbus_screensaver: remove bogus error

When the service is absent, the error message is NULL anyhow.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dfc527fe329f6cbe997af963e864420f28af588b
---

 modules/misc/inhibit/dbus.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/misc/inhibit/dbus.c b/modules/misc/inhibit/dbus.c
index a23a923..6618d54 100644
--- a/modules/misc/inhibit/dbus.c
+++ b/modules/misc/inhibit/dbus.c
@@ -192,7 +192,7 @@ static int Open (vlc_object_t *obj)
 
     for (unsigned i = 0; i < MAX_API; i++)
     {
-        if (dbus_bus_name_has_owner(sys->conn, dbus_service[i], &err))
+        if (dbus_bus_name_has_owner(sys->conn, dbus_service[i], NULL))
         {
             msg_Dbg(ih, "found service %s", dbus_service[i]);
             sys->api = i;
@@ -201,9 +201,7 @@ static int Open (vlc_object_t *obj)
             return VLC_SUCCESS;
         }
 
-        msg_Dbg(ih, "cannot find service %s: %s", dbus_service[i],
-                err.message);
-        dbus_error_free(&err);
+        msg_Dbg(ih, "cannot find service %s", dbus_service[i]);
     }
 
     Close(obj);



More information about the vlc-commits mailing list