controls.reserved[0] = 0;
controls.reserved[1] = 0;
controls.count = 0;
- controls.controls = calloc( sizeof( struct v4l2_ext_control ),
- MAX_V4L2_CTRLS );
+ controls.controls = calloc( MAX_V4L2_CTRLS,
+ sizeof( struct v4l2_ext_control ) );
if( controls.controls == NULL )
return VLC_ENOMEM;
/* get lock, avoid segfault */
vlc_mutex_lock( &qt_mutex );
- p_sys = calloc( sizeof( decoder_sys_t ), 1 );
+ p_sys = calloc( 1, sizeof( decoder_sys_t ) );
p_dec->p_sys = p_sys;
p_dec->pf_decode_audio = DecodeAudio;
{
const uint8_t *p_pal = fmt.p_extra;
- fmt.video.p_palette = calloc( sizeof(video_palette_t), 1 );
+ fmt.video.p_palette = calloc( 1, sizeof(video_palette_t) );
fmt.video.p_palette->i_entries = __MIN(fmt.i_extra/4, 256);
for( int i = 0; i < fmt.video.p_palette->i_entries; i++ )
i_count = __MIN( p_indx->i_entriesinuse, i_read / 8 );
p_indx->i_entriesinuse = i_count;
- p_indx->idx.std = calloc( sizeof( indx_std_entry_t ), i_count );
+ p_indx->idx.std = calloc( i_count, sizeof( indx_std_entry_t ) );
for( i = 0; i < i_count; i++ )
{
i_count = __MIN( p_indx->i_entriesinuse, i_read / 12 );
p_indx->i_entriesinuse = i_count;
- p_indx->idx.field = calloc( sizeof( indx_field_entry_t ), i_count );
+ p_indx->idx.field = calloc( i_count, sizeof( indx_field_entry_t ) );
for( i = 0; i < i_count; i++ )
{
AVI_READ4BYTES( p_indx->idx.field[i].i_offset );
i_count = __MIN( p_indx->i_entriesinuse, i_read / 16 );
p_indx->i_entriesinuse = i_count;
- p_indx->idx.super = calloc( sizeof( indx_super_entry_t ), i_count );
+ p_indx->idx.super = calloc( i_count, sizeof( indx_super_entry_t ) );
for( i = 0; i < i_count; i++ )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
intf_sys_t *p_sys;
- p_sys = p_intf->p_sys = calloc( sizeof(intf_sys_t), 1);
+ p_sys = p_intf->p_sys = calloc( 1, sizeof(intf_sys_t) );
if( !p_sys )
return VLC_ENOMEM;
char * psz;
/* Allocate structure */
- p_vout->p_sys = p_sys = calloc( sizeof( vout_sys_t ), 1 );
+ p_vout->p_sys = p_sys = calloc( 1, sizeof( vout_sys_t ) );
if( p_sys == NULL )
return VLC_EGENERIC;
p_new->i_flags = p_this->i_flags
& (OBJECT_FLAGS_NODBG|OBJECT_FLAGS_QUIET|OBJECT_FLAGS_NOINTERACT);
- p_priv->p_vars = calloc( sizeof( variable_t ), 16 );
+ p_priv->p_vars = calloc( 16, sizeof( variable_t ) );
if( !p_priv->p_vars )
{