[vlc-commits] dbus: fix undefined zero-size arrays
Rémi Denis-Courmont
git at videolan.org
Mon Apr 14 22:40:34 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 14 23:36:34 2014 +0300| [9ddb7984a456392428664399236e456140ed80be] | committer: Rémi Denis-Courmont
dbus: fix undefined zero-size arrays
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ddb7984a456392428664399236e456140ed80be
---
modules/control/dbus/dbus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 1d5c5b8..bbf7f7b 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -847,7 +847,7 @@ static void *Run( void *data )
/* Get the list of timeouts to process */
unsigned int i_timeouts = vlc_array_count( p_sys->p_timeouts );
- DBusTimeout *p_timeouts[i_timeouts];
+ DBusTimeout *p_timeouts[i_timeouts ? i_timeouts : 1];
for( unsigned int i = 0; i < i_timeouts; i++ )
{
p_timeouts[i] = vlc_array_item_at_index( p_sys->p_timeouts, i );
@@ -863,7 +863,7 @@ static void *Run( void *data )
/* Get the list of events to process */
int i_events = vlc_array_count( p_intf->p_sys->p_events );
- callback_info_t* p_info[i_events];
+ callback_info_t* p_info[i_events ? i_events : 1];
for( int i = i_events - 1; i >= 0; i-- )
{
p_info[i] = vlc_array_item_at_index( p_intf->p_sys->p_events, i );
More information about the vlc-commits
mailing list