[vlc-commits] dbus: fix vlc_array_remove sign (cid #1401377)
Thomas Guillem
git at videolan.org
Thu Feb 23 14:46:13 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb 23 14:30:41 2017 +0100| [1f11f5eedbb192ed21a9b10a3762e72b5d158a71] | committer: Thomas Guillem
dbus: fix vlc_array_remove sign (cid #1401377)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f11f5eedbb192ed21a9b10a3762e72b5d158a71
---
modules/control/dbus/dbus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 1047f0b..46692c5 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -352,11 +352,11 @@ static void remove_timeout(DBusTimeout *to, void *data)
{
intf_thread_t *intf = data;
intf_sys_t *sys = intf->p_sys;
- size_t idx;
vlc_mutex_lock(&sys->lock);
- idx = vlc_array_index_of_item(&sys->timeouts, to);
- vlc_array_remove(&sys->timeouts, idx);
+ ssize_t idx = vlc_array_index_of_item(&sys->timeouts, to);
+ if (idx >= 0)
+ vlc_array_remove(&sys->timeouts, (size_t) idx);
vlc_mutex_unlock(&sys->lock);
}
More information about the vlc-commits
mailing list