mirror of https://code.videolan.org/videolan/vlc
Remove obvious statements.
This commit is contained in:
parent
7870e9b5cd
commit
08cc5fd694
|
@ -537,7 +537,7 @@ static inline void ml_gc_decref( ml_media_t* p_media )
|
|||
pool = p_gc->pool;
|
||||
vlc_spin_unlock (&p_gc->spin);
|
||||
|
||||
if( refs == 0 && pool == false )
|
||||
if( refs == 0 && !pool )
|
||||
{
|
||||
vlc_spin_destroy (&p_gc->spin);
|
||||
p_gc->pf_destructor (p_gc);
|
||||
|
|
|
@ -2458,7 +2458,7 @@ char *en50221_Status( cam_t *p_cam, char *psz_request )
|
|||
{
|
||||
mmi_object.i_object_type = EN50221_MMI_ANSW;
|
||||
mmi_object.u.answ.b_ok = b_ok;
|
||||
if ( b_ok == false )
|
||||
if ( !b_ok )
|
||||
{
|
||||
mmi_object.u.answ.psz_answ = strdup("");
|
||||
}
|
||||
|
@ -2476,7 +2476,7 @@ char *en50221_Status( cam_t *p_cam, char *psz_request )
|
|||
else
|
||||
{
|
||||
mmi_object.i_object_type = EN50221_MMI_MENU_ANSW;
|
||||
if ( b_ok == false )
|
||||
if ( !b_ok )
|
||||
{
|
||||
mmi_object.u.menu_answ.i_choice = 0;
|
||||
}
|
||||
|
|
|
@ -530,7 +530,7 @@ static int PresetCallback( vlc_object_t *p_aout, char const *psz_cmd,
|
|||
free( psz_newbands );
|
||||
psz_newbands = psz;
|
||||
}
|
||||
if( p_sys->b_first == false )
|
||||
if( !p_sys->b_first )
|
||||
{
|
||||
vlc_mutex_unlock( &p_sys->lock );
|
||||
var_SetString( p_aout, "equalizer-bands", psz_newbands );
|
||||
|
|
|
@ -229,7 +229,7 @@ static int Open( vlc_object_t * p_this )
|
|||
b_alive = false;
|
||||
}
|
||||
|
||||
if( b_alive == false )
|
||||
if( !b_alive )
|
||||
{
|
||||
msg_Warn( p_aout, "selected audio device is not alive, switching to default device" );
|
||||
p_sys->i_selected_dev = p_sys->i_default_dev;
|
||||
|
@ -720,7 +720,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
|
|||
p_sys->i_stream_id = p_streams[i];
|
||||
p_sys->i_stream_index = i;
|
||||
|
||||
if( p_sys->b_revert == false )
|
||||
if( !p_sys->b_revert )
|
||||
{
|
||||
/* Retrieve the original format of this stream first if not done so already */
|
||||
i_param_size = sizeof( p_sys->sfmt_revert );
|
||||
|
|
|
@ -1270,8 +1270,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
|
|||
|
||||
if( strlen( newval.psz_string ) > 0 )
|
||||
{
|
||||
if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
|
||||
( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
|
||||
if ( ( !strncmp( newval.psz_string, "on", 2 ) && val.b_bool ) ||
|
||||
( !strncmp( newval.psz_string, "off", 3 ) && !val.b_bool ) )
|
||||
{
|
||||
b_update = false;
|
||||
}
|
||||
|
@ -1292,8 +1292,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
|
|||
|
||||
if( strlen( newval.psz_string ) > 0 )
|
||||
{
|
||||
if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
|
||||
( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
|
||||
if ( ( !strncmp( newval.psz_string, "on", 2 ) && val.b_bool ) ||
|
||||
( !strncmp( newval.psz_string, "off", 3 ) && !val.b_bool ) )
|
||||
{
|
||||
b_update = false;
|
||||
}
|
||||
|
@ -1314,8 +1314,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
|
|||
|
||||
if( strlen( newval.psz_string ) > 0 )
|
||||
{
|
||||
if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
|
||||
( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
|
||||
if ( ( !strncmp( newval.psz_string, "on", 2 ) && val.b_bool ) ||
|
||||
( !strncmp( newval.psz_string, "off", 3 ) && !val.b_bool ) )
|
||||
{
|
||||
b_update = false;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ static int Open (vlc_object_t *obj)
|
|||
|
||||
result = tune->read (data, size);
|
||||
free (data);
|
||||
if (result==false)
|
||||
if (!result)
|
||||
goto error;
|
||||
|
||||
player = new sidplay2();
|
||||
|
@ -163,7 +163,7 @@ static int Open (vlc_object_t *obj)
|
|||
sys->tune->selectSong (0);
|
||||
result = (sys->player->load (sys->tune) >=0 );
|
||||
sys->player->fastForward (100);
|
||||
if (result==false)
|
||||
if (!result)
|
||||
goto error;
|
||||
|
||||
/* Callbacks */
|
||||
|
@ -202,7 +202,7 @@ static int Demux (demux_t *demux)
|
|||
if (unlikely(block==NULL))
|
||||
return 0;
|
||||
|
||||
if (sys->tune->getStatus() == false) {
|
||||
if (!sys->tune->getStatus()) {
|
||||
block_Release (block);
|
||||
return 0;
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ static int Control (demux_t *demux, int query, va_list args)
|
|||
int i_idx = (int) va_arg (args, int);
|
||||
sys->tune->selectSong (i_idx+1);
|
||||
bool result = (sys->player->load (sys->tune) >=0 );
|
||||
if (result == false)
|
||||
if (!result)
|
||||
return VLC_EGENERIC;
|
||||
|
||||
demux->info.i_title = i_idx;
|
||||
|
|
|
@ -532,7 +532,7 @@ static int vlclua_del_callback( lua_State *L )
|
|||
lua_pop( L, 1 );
|
||||
/* obj var func data callbacks index */
|
||||
}
|
||||
if( b_found == false )
|
||||
if( !b_found )
|
||||
/* obj var func data callbacks */
|
||||
return luaL_error( L, "Couldn't find matching callback." );
|
||||
/* else */
|
||||
|
|
|
@ -537,7 +537,7 @@ static void ScanFiles( monitoring_thread_t *p_mon, int i_dir_id,
|
|||
vlc_array_t* delete_ids = vlc_array_new();
|
||||
for( i = 0; i < i_mon_rows; i++ )
|
||||
{
|
||||
if( pb_processed[i] == false )
|
||||
if( !pb_processed[i] )
|
||||
{
|
||||
/* This file doesn't exist anymore. Let's...urm...delete it. */
|
||||
ml_element_t* find = ( ml_element_t* ) calloc( 1, sizeof( ml_element_t ) );
|
||||
|
|
|
@ -270,7 +270,7 @@ static void Run( intf_thread_t *p_intf )
|
|||
continue; /* holding on until next_exchange */
|
||||
|
||||
/* handshake if needed */
|
||||
if( p_sys->b_handshaked == false )
|
||||
if( !p_sys->b_handshaked )
|
||||
{
|
||||
msg_Dbg( p_intf, "Handshaking with last.fm ..." );
|
||||
|
||||
|
@ -307,7 +307,7 @@ static void Run( intf_thread_t *p_intf )
|
|||
break;
|
||||
}
|
||||
/* if handshake failed let's restart the loop */
|
||||
if( p_sys->b_handshaked == false )
|
||||
if( !p_sys->b_handshaked )
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -475,7 +475,7 @@ static int PlayingChange( vlc_object_t *p_this, const char *psz_var,
|
|||
var_Get( p_input, "state", &state_value );
|
||||
|
||||
|
||||
if( p_sys->b_meta_read == false && state_value.i_int >= PLAYING_S )
|
||||
if( !p_sys->b_meta_read && state_value.i_int >= PLAYING_S )
|
||||
{
|
||||
ReadMetaData( p_intf );
|
||||
return VLC_SUCCESS;
|
||||
|
|
|
@ -152,7 +152,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *p_es,
|
|||
int i;
|
||||
|
||||
p_es->i_last = p_buffer->i_dts;
|
||||
if ( p_es->id == NULL && p_es->b_error != true )
|
||||
if ( !p_es->id && !p_es->b_error )
|
||||
{
|
||||
p_es->id = p_stream->p_next->pf_add( p_stream->p_next, &p_es->fmt );
|
||||
if ( p_es->id == NULL )
|
||||
|
@ -163,7 +163,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *p_es,
|
|||
}
|
||||
}
|
||||
|
||||
if ( p_es->b_error != true )
|
||||
if ( !p_es->b_error )
|
||||
p_stream->p_next->pf_send( p_stream->p_next, p_es->id, p_buffer );
|
||||
else
|
||||
block_ChainRelease( p_buffer );
|
||||
|
|
|
@ -283,7 +283,7 @@ static int Del(sout_stream_t *p_stream, sout_stream_id_t *p_es)
|
|||
static int Send(sout_stream_t *p_stream, sout_stream_id_t *p_es,
|
||||
block_t *p_buffer)
|
||||
{
|
||||
if (p_es->id == NULL && p_es->b_error != true)
|
||||
if (p_es->id == NULL && !p_es->b_error)
|
||||
{
|
||||
p_es->id = p_stream->p_next->pf_add(p_stream->p_next, &p_es->fmt);
|
||||
if (p_es->id == NULL)
|
||||
|
@ -294,7 +294,7 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_t *p_es,
|
|||
}
|
||||
}
|
||||
|
||||
if ((p_es->b_error != true) && p_es->b_enabled)
|
||||
if (!p_es->b_error && p_es->b_enabled)
|
||||
p_stream->p_next->pf_send(p_stream->p_next, p_es->id, p_buffer);
|
||||
else
|
||||
block_ChainRelease(p_buffer);
|
||||
|
|
|
@ -246,7 +246,7 @@ static picture_t *FilterPlanar( filter_t *p_filter, picture_t *p_pic )
|
|||
/*
|
||||
* Threshold mode drops out everything about luma, contrast and gamma.
|
||||
*/
|
||||
if( b_thres != true )
|
||||
if( !b_thres )
|
||||
{
|
||||
|
||||
/* Contrast is a fast but kludged function, so I put this gap to be
|
||||
|
@ -485,7 +485,7 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_pic )
|
|||
/*
|
||||
* Threshold mode drops out everything about luma, contrast and gamma.
|
||||
*/
|
||||
if( b_thres != true )
|
||||
if( !b_thres )
|
||||
{
|
||||
|
||||
/* Contrast is a fast but kludged function, so I put this gap to be
|
||||
|
|
|
@ -132,7 +132,7 @@ void CAtmoExternalCaptureInput::DeliverNewSourceDataPaket(BITMAPINFOHEADER *bmpI
|
|||
|
||||
DWORD CAtmoExternalCaptureInput::Execute(void)
|
||||
{
|
||||
while ((this->m_bTerminated == ATMO_FALSE) && (this->m_pAtmoThread->b_die == false)) {
|
||||
while ((this->m_bTerminated == ATMO_FALSE) && !this->m_pAtmoThread->b_die) {
|
||||
vlc_mutex_lock( &m_WakeupLock );
|
||||
vlc_cond_timedwait(&m_WakeupCond, &m_WakeupLock, mdate() + 75000 );
|
||||
|
||||
|
|
|
@ -816,7 +816,7 @@ static int32_t AtmoInitialize(filter_t *p_filter, bool b_for_thread)
|
|||
filter_sys_t *p_sys = p_filter->p_sys;
|
||||
if(p_sys->p_atmo_config)
|
||||
{
|
||||
if(b_for_thread == false)
|
||||
if(!b_for_thread)
|
||||
{
|
||||
/* open com port */
|
||||
/* setup Output Threads ... */
|
||||
|
|
|
@ -332,7 +332,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
|
|||
}
|
||||
}
|
||||
|
||||
if( p_sys->b_updated == false )
|
||||
if( !p_sys->b_updated )
|
||||
return NULL;
|
||||
|
||||
subpicture_t *p_spu = NULL;
|
||||
|
|
|
@ -279,7 +279,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
|
|||
vlc_mutex_lock( &p_sys->lock );
|
||||
if( p_sys->last_time + p_sys->i_refresh > date )
|
||||
goto out;
|
||||
if( p_sys->b_need_update == false )
|
||||
if( !p_sys->b_need_update )
|
||||
goto out;
|
||||
|
||||
p_spu = filter_NewSubpicture( p_filter );
|
||||
|
|
|
@ -803,8 +803,8 @@ static void* update_request_thread( vlc_object_t *p_thread_obj )
|
|||
udr.w = htons(p_sys->i_vnc_width);
|
||||
udr.h = htons(p_sys->i_vnc_height);
|
||||
|
||||
if( write_exact(p_filter, p_sys->i_socket, (char*)&udr,
|
||||
sz_rfbFramebufferUpdateRequestMsg) == false)
|
||||
if( !write_exact(p_filter, p_sys->i_socket, (char*)&udr,
|
||||
sz_rfbFramebufferUpdateRequestMsg) )
|
||||
{
|
||||
msg_Err( p_filter, "Could not write rfbFramebufferUpdateRequestMsg." );
|
||||
p_sys->b_continue = false;
|
||||
|
@ -819,8 +819,8 @@ static void* update_request_thread( vlc_object_t *p_thread_obj )
|
|||
while( vlc_object_alive( p_thread_obj ) )
|
||||
{
|
||||
msleep( i_poll_interval_microsec );
|
||||
if( write_exact(p_filter, p_sys->i_socket, (char*)&udr,
|
||||
sz_rfbFramebufferUpdateRequestMsg) == false)
|
||||
if( !write_exact(p_filter, p_sys->i_socket, (char*)&udr,
|
||||
sz_rfbFramebufferUpdateRequestMsg))
|
||||
{
|
||||
msg_Err( p_filter, "Could not write rfbFramebufferUpdateRequestMsg." );
|
||||
break;
|
||||
|
|
|
@ -112,7 +112,7 @@ media_library_t* ml_Get( vlc_object_t* p_this )
|
|||
p_ml = libvlc_priv (p_this->p_libvlc)->p_ml;
|
||||
assert( VLC_OBJECT( p_ml ) != p_this );
|
||||
if( p_ml == NULL &&
|
||||
var_GetBool( p_this->p_libvlc, "load-media-library-on-startup" ) == false )
|
||||
!var_GetBool( p_this->p_libvlc, "load-media-library-on-startup" ) )
|
||||
{
|
||||
libvlc_priv (p_this->p_libvlc)->p_ml
|
||||
= ml_Create( VLC_OBJECT( p_this->p_libvlc ), NULL );
|
||||
|
|
Loading…
Reference in New Issue