vlc | branch: master | Rémi Duraffort <[email protected]> | Sun Apr  3 
11:55:04 2011 +0200| [e9903f9dbac133883b315de7829e8e5f56e2f6e3] | committer: 
Rémi Duraffort

Fix calloc usage.

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

 modules/control/dbus/dbus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 4594f2b..fd67747 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -355,7 +355,7 @@ static dbus_bool_t add_timeout( DBusTimeout *p_timeout, 
void *p_data )
     intf_thread_t *p_intf = (intf_thread_t*) p_data;
     intf_sys_t    *p_sys  = (intf_sys_t*) p_intf->p_sys;
 
-    timeout_info_t *p_info = calloc( sizeof( timeout_info_t ), 1 );
+    timeout_info_t *p_info = calloc( 1, sizeof( timeout_info_t ) );
     p_info->i_remaining = dbus_timeout_get_interval( p_timeout ) * 1000;/* µs 
*/
     p_info->p_timeout = p_timeout;
 
@@ -724,7 +724,7 @@ static void Run          ( intf_thread_t *p_intf )
         vlc_mutex_lock( &p_sys->lock );
 
         int i_watches = vlc_array_count( p_sys->p_watches );
-        struct pollfd *p_fds = calloc( sizeof( struct pollfd ), i_watches );
+        struct pollfd *p_fds = calloc( i_watches, sizeof( struct pollfd ) );
 
         int i_fds = GetPollFds( p_intf, p_fds );
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to