[vlc-commits] inhibit/dbus: fix flawed logic

Rémi Denis-Courmont git at videolan.org
Sat Sep 2 18:52:14 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Sep  2 19:51:51 2017 +0300| [bfb8ace0523a0b4f66a86b87f7cb11adbfb095ea] | committer: Rémi Denis-Courmont

inhibit/dbus: fix flawed logic

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

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

diff --git a/modules/misc/inhibit/dbus.c b/modules/misc/inhibit/dbus.c
index 2b6b003002..90c1c5188c 100644
--- a/modules/misc/inhibit/dbus.c
+++ b/modules/misc/inhibit/dbus.c
@@ -159,9 +159,9 @@ static void Inhibit(vlc_inhibit_t *ih, unsigned flags)
     else
     {
         assert(sys->cookie != 0);
-        if (!dbus_message_append_args(msg, DBUS_TYPE_UINT32, &sys->cookie,
+        if (dbus_message_append_args(msg, DBUS_TYPE_UINT32, &sys->cookie,
                                            DBUS_TYPE_INVALID)
-         || !dbus_connection_send (sys->conn, msg, NULL))
+         && dbus_connection_send (sys->conn, msg, NULL))
             sys->cookie = 0;
     }
     dbus_connection_flush(sys->conn);



More information about the vlc-commits mailing list