Commit 98be9ffa authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Wav: cosmetics (alignment, unlikely, locality)

parent efeb2e71
......@@ -119,7 +119,7 @@ static int Open( vlc_object_t * p_this )
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( *p_sys ) );
if( p_sys == NULL )
if( unlikely(!p_sys) )
return VLC_ENOMEM;
p_sys->p_es = NULL;
......@@ -148,7 +148,7 @@ static int Open( vlc_object_t * p_this )
/* load waveformatex */
p_wf_ext = malloc( i_size );
if( p_wf_ext == NULL )
if( unlikely( !p_wf_ext ) )
goto error;
p_wf = &p_wf_ext->Format;
......@@ -181,7 +181,7 @@ static int Open( vlc_object_t * p_this )
( p_sys->fmt.i_extra + sizeof( WAVEFORMATEX )
>= sizeof( WAVEFORMATEXTENSIBLE ) ) )
{
unsigned i, i_channel_mask;
unsigned i_channel_mask;
GUID guid_subformat;
guid_subformat = p_wf_ext->SubFormat;
......@@ -198,7 +198,7 @@ static int Open( vlc_object_t * p_this )
if( i_channel_mask )
{
int i_match = 0;
for( i = 0; i < sizeof(pi_channels_src)/sizeof(*pi_channels_src); i++ )
for( unsigned i = 0; i < sizeof(pi_channels_src)/sizeof(*pi_channels_src); i++ )
{
if( i_channel_mask & pi_channels_src[i] )
{
......@@ -286,7 +286,7 @@ static int Open( vlc_object_t * p_this )
if( p_sys->fmt.i_extra > 0 )
{
p_sys->fmt.p_extra = malloc( p_sys->fmt.i_extra );
if( !p_sys->fmt.p_extra )
if( unlikely(!p_sys->fmt.p_extra) )
{
p_sys->fmt.i_extra = 0;
goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment