]> git.sesse.net Git - vlc/commitdiff
Remove obvious statements.
authorRémi Duraffort <ivoire@videolan.org>
Mon, 21 Mar 2011 21:48:19 +0000 (22:48 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 21 Mar 2011 21:59:18 +0000 (22:59 +0100)
18 files changed:
include/vlc_media_library.h
modules/access/dvb/en50221.c
modules/audio_filter/equalizer.c
modules/audio_output/auhal.c
modules/control/rc.c
modules/demux/sid.cpp
modules/lua/libs/variables.c
modules/media_library/sql_monitor.c
modules/misc/audioscrobbler.c
modules/stream_out/autodel.c
modules/stream_out/select.c
modules/video_filter/adjust.c
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
modules/video_filter/atmo/atmo.cpp
modules/video_filter/dynamicoverlay/dynamicoverlay.c
modules/video_filter/marq.c
modules/video_filter/remoteosd.c
src/misc/media_library.c

index 7179ac314957ea754bfa4895e73296abe6a4a07f..994fa860b5c0d4bb31810ad5b850851f61f1c283 100644 (file)
@@ -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);
index cc391c5e6f5bc1b6f9d476a6f1a678e140795298..c85f80996e8705da9c807c728a9ac45d56139367 100644 (file)
@@ -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;
             }
index f6fae1676157d8809c10a66bf1cd1b9247acbc88..8bcc468b2500bf1b46d81718a8eb86e48adce83c 100644 (file)
@@ -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 );
index d819f6c6867821c485515accd5f8b3d6c8bdd75a..19bcee046b64a98f1b443265cc56590940f1fc13 100644 (file)
@@ -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 );
index 708f4d120d4e58cb2fe3d9ba452fbc6588e38098..c6310b0d9356dea20c02104e59fa247272cb41bf 100644 (file)
@@ -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;
             }
index 2fac3375f6498814bd74a9e7a019c1c1e43ee57c..d546e395997d7e79b217f1844ae33edd68b82ea6 100644 (file)
@@ -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;
index ec718b348689b8db47fbca2c0ee82818764b1239..26bc0d9057d37646a6387c7ff83c32482ded593a 100644 (file)
@@ -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 */
index b98aba6e7fa8fb8673530860e649b3bcb9ce6559..651b3965d90e9c4ae2b9b215af13802411697b2e 100644 (file)
@@ -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 ) );
index 284f7598f902f5756ec3b2251f696becad796088..cd29830635cc2d260c2039879a6b09a78f47b4b6 100644 (file)
@@ -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;
index e9229e5dcfdc0cfa2d303146dd13f30af9b6d0ea..dffb687c4130222dab347a0ac8d425e9cdf4f54d 100644 (file)
@@ -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 );
index 93636b3a83f76138a5416eb815d6d1e3d8180df0..fe4169dce4416618f09ef389567c36c7397cbd4b 100644 (file)
@@ -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);
index 820082c94a5832d548c3de92a8cbd9bb4e036864..5e25846902b3d1fbf73468f6c4c455b35ce20a61 100644 (file)
@@ -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
index fceda92a69a4cf0a3255a86b423dd2bfdd22818b..ac8aff880e894b4d207fd5279e097aea2817e05b 100644 (file)
@@ -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 );
 
index d91442be4c4e247e5bd6fd6792ff7e19e34cf757..461a2a0264e2266089f2c443fe65edf6e61dbdca 100644 (file)
@@ -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 ... */
index c7d20bb065f6f0a9645eeff030e2f26a221191c6..caa5f752ce154b911532bbd57f7efd0f48d1def5 100644 (file)
@@ -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;
index 44aae92106a7caa3cb2056e5d4b4ec12a4e21aff..6f754cb0c0faa3137fde19494242d4e0b78d5499 100644 (file)
@@ -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 );
index e5319556eacbb4ead4a7d3e06553a987a2eb19d7..34bf760ec4d4acc607bc451f89fee6b4d87ed742 100644 (file)
@@ -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;
index 4aa4123380779028fb6508fa6df0a92bf3bf33b5..e855703452363a942427ea405d56c93f7c101872 100644 (file)
@@ -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 );