]> git.sesse.net Git - vlc/commitdiff
Remove obvious statement.
authorRémi Duraffort <ivoire@videolan.org>
Mon, 21 Mar 2011 21:21:51 +0000 (22:21 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 21 Mar 2011 21:35:11 +0000 (22:35 +0100)
24 files changed:
include/vlc_media_library.h
modules/access/dvb/en50221.c
modules/access/dvb/http.c
modules/access/http.c
modules/codec/schroedinger.c
modules/control/http/mvar.c
modules/control/rc.c
modules/gui/qt4/components/complete_preferences.cpp
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/util/searchlineedit.cpp
modules/media_library/sql_media_library.c
modules/media_library/sql_search.c
modules/misc/gnutls.c
modules/misc/notify/growl_udp.c
modules/video_filter/atmo/atmo.cpp
modules/video_filter/deinterlace.c
modules/video_filter/dynamicoverlay/dynamicoverlay.c
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
modules/video_filter/dynamicoverlay/dynamicoverlay_list.c
modules/video_filter/remoteosd.c
src/input/vlm.c
src/input/vlmshell.c
src/libvlc.c
src/misc/stats.c

index f682753ab186237218c581ec27d0dc28637daef5..7179ac314957ea754bfa4895e73296abe6a4a07f 100644 (file)
@@ -783,7 +783,7 @@ static inline void ml_GenericFreeFindTree( ml_ftree_t* tree, bool freestrings )
         free( tree->right );
     }
     if( tree->op == ML_OP_NONE && ml_AttributeIsString( tree->criteria )
-            && freestrings == true)
+            && freestrings)
     {
         free( tree->value.str );
         if( tree->criteria == ML_PEOPLE )
index 2c1e9835b0bb5edada7f15f2ef6e81eaa9e55c9c..cc391c5e6f5bc1b6f9d476a6f1a678e140795298 100644 (file)
@@ -1627,7 +1627,7 @@ static void MMISendObject( cam_t *p_cam, int i_session_id,
         i_tag = AOT_ANSW;
         i_size = 1 + strlen( p_object->u.answ.psz_answ );
         p_data = xmalloc( i_size );
-        p_data[0] = (p_object->u.answ.b_ok == true) ? 0x1 : 0x0;
+        p_data[0] = p_object->u.answ.b_ok ? 0x1 : 0x0;
         strncpy( (char *)&p_data[1], p_object->u.answ.psz_answ, i_size - 1 );
         break;
 
@@ -1723,7 +1723,7 @@ static void MMIHandleEnq( cam_t *p_cam, int i_session_id,
     p_mmi->u.enq.psz_text[l] = '\0';
 
     msg_Dbg( p_cam->obj, "MMI enq: %s%s", p_mmi->u.enq.psz_text,
-             p_mmi->u.enq.b_blind == true ? " (blind)" : "" );
+             p_mmi->u.enq.b_blind ? " (blind)" : "" );
     p_cam->pb_slot_mmi_expected[i_slot] = false;
     p_cam->pb_slot_mmi_undisplayed[i_slot] = true;
 }
@@ -2355,7 +2355,7 @@ static int en50221_CloseMMI( cam_t * p_cam, unsigned i_slot )
  *****************************************************************************/
 static mmi_t *en50221_GetMMIObject( cam_t * p_cam, unsigned i_slot )
 {
-    if( p_cam->pb_slot_mmi_expected[i_slot] == true )
+    if( p_cam->pb_slot_mmi_expected[i_slot] )
         return NULL; /* should not happen */
 
     for( unsigned i = 1; i <= MAX_SESSIONS; i++ )
@@ -2403,7 +2403,7 @@ char *en50221_Status( cam_t *p_cam, char *psz_request )
          * the user input to avoid confusing the CAM. */
         for ( unsigned i_slot = 0; i_slot < p_cam->i_nb_slots; i_slot++ )
         {
-            if ( p_cam->pb_slot_mmi_undisplayed[i_slot] == true )
+            if ( p_cam->pb_slot_mmi_undisplayed[i_slot] )
             {
                 psz_request = NULL;
                 msg_Dbg( p_cam->obj,
@@ -2497,7 +2497,7 @@ char *en50221_Status( cam_t *p_cam, char *psz_request )
     /* Check that we have all necessary MMI information. */
     for( unsigned i_slot = 0; i_slot < p_cam->i_nb_slots; i_slot++ )
     {
-        if ( p_cam->pb_slot_mmi_expected[i_slot] == true )
+        if ( p_cam->pb_slot_mmi_expected[i_slot] )
             return NULL;
     }
 
index c03efcd974500e87208b9c5f40283e2be501dd39..a13abf06f904e48622788d2d92a00c68378dcc8c 100644 (file)
@@ -187,12 +187,12 @@ void HTTPClose( access_t *p_access )
         {
             /* Unlock the thread if it is stuck in HttpCallback */
             vlc_mutex_lock( &p_sys->httpd_mutex );
-            if ( p_sys->b_request_frontend_info == true )
+            if ( p_sys->b_request_frontend_info )
             {
                 p_sys->b_request_frontend_info = false;
                 p_sys->psz_frontend_info = strdup("");
             }
-            if ( p_sys->b_request_mmi_info == true )
+            if ( p_sys->b_request_mmi_info )
             {
                 p_sys->b_request_mmi_info = false;
                 p_sys->psz_mmi_info = strdup("");
index 926435d4cd11a7b75c60ff958ed91c66edcdcc00..b45485835d3556cbf019dcd785bff8a01630a860 100644 (file)
@@ -1162,7 +1162,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
     setsockopt (p_sys->fd, SOL_SOCKET, SO_KEEPALIVE, &(int){ 1 }, sizeof (int));
 
     /* Initialize TLS/SSL session */
-    if( p_sys->b_ssl == true )
+    if( p_sys->b_ssl )
     {
         /* CONNECT to establish TLS tunnel through HTTP proxy */
         if( p_sys->b_proxy )
index 5770dc44b8d58decc422c1e0193f3b4cbda42056..4d458bfc11e019586ae2fdf514e16fdbd01b2650 100644 (file)
@@ -822,7 +822,7 @@ static int OpenEncoder( vlc_object_t *p_this )
 
 
     b_tmp = var_GetBool( p_enc, ENC_CFG_PREFIX ENC_CODINGMODE );
-    if( b_tmp == true )
+    if( b_tmp )
         p_sys->b_auto_field_coding = true;
     else
         p_sys->b_auto_field_coding = false;
index 89db17352938a516221b98f12369d7fe201d5ddf..39098eb738c2bd097b97e4ad2f1213ba43f3b379 100644 (file)
@@ -625,7 +625,7 @@ static void mvar_VlmSetNewLoop( char *name, vlm_t *vlm, mvar_t *s,
 
     /* Add a node with name and info */
     set = mvar_New( name, "set" );
-    if( b_name == true )
+    if( b_name )
     {
         mvar_AppendNewVar( set, "name", el->psz_name );
     }
index 473b81d88386e041960ad812c27936b401253a3d..708f4d120d4e58cb2fe3d9ba452fbc6588e38098 100644 (file)
@@ -1270,7 +1270,7 @@ 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 == true ) ) ||
+            if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
                  ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
             {
                 b_update = false;
@@ -1292,7 +1292,7 @@ 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 == true ) ) ||
+            if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
                  ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
             {
                 b_update = false;
@@ -1314,7 +1314,7 @@ 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 == true ) ) ||
+            if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool ) ) ||
                  ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == false ) ) )
             {
                 b_update = false;
index 747fd10e694048ea7801a659c2bfbe739cd726d5..9702c6f93f0306edadccf038e7dc5401e78f7ee5 100644 (file)
@@ -441,7 +441,7 @@ AdvPrefsPanel::AdvPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             ( p_item->i_type == CONFIG_CATEGORY ||
               p_item->i_type == CONFIG_SUBCATEGORY ) )
             break;
-        if( p_item->b_internal == true ) continue;
+        if( p_item->b_internal ) continue;
 
         if( p_item->i_type == CONFIG_SECTION )
         {
index f98215a42c3c63103abb634624f6455b6e54bc56..b97521a5df907b61b31569f5902190b8573b3dc1 100644 (file)
@@ -1122,7 +1122,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
 
 void BoolConfigControl::finish()
 {
-    checkbox->setChecked( p_item->value.i == true );
+    checkbox->setChecked( p_item->value.i );
     if( p_item->psz_longtext )
         checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
 }
index 58b825139b3aa590a28b7f0457ca68fe2ab2ba4a..9b3abdb1899d60b0ec8f4b379c3895649e049726 100644 (file)
@@ -65,7 +65,7 @@ void ClickLineEdit::setText( const QString &txt )
 void ClickLineEdit::paintEvent( QPaintEvent *pe )
 {
     QLineEdit::paintEvent( pe );
-    if ( mDrawClickMsg == true && !hasFocus() ) {
+    if ( mDrawClickMsg && !hasFocus() ) {
         QPainter p( this );
         QPen tmp = p.pen();
         p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) );
@@ -86,7 +86,7 @@ void ClickLineEdit::dropEvent( QDropEvent *ev )
 
 void ClickLineEdit::focusInEvent( QFocusEvent *ev )
 {
-    if ( mDrawClickMsg == true ) {
+    if ( mDrawClickMsg ) {
         mDrawClickMsg = false;
         repaint();
     }
index bfdb552051a8bb60c4656686166f789eb7c6a513..c56479bd6a966f984fc6762848aa157895dc0876 100644 (file)
@@ -1128,7 +1128,7 @@ ml_media_t* GetMedia( media_library_t* p_ml, int id,
         else
         {
             ml_LockMedia( p_media );
-            if( p_media->b_sparse == true && select == ML_MEDIA )
+            if( p_media->b_sparse && select == ML_MEDIA )
                 reload = true;
             /* Utilise ML_MEDIA_EXTRA load? TODO */
             ml_UnlockMedia( p_media );
index fdd632a184aeef68faf2ca8431524e29179eb8f4..439b580c1e6422d0af27f8bf6b44917e8bbbe5db 100644 (file)
@@ -764,7 +764,7 @@ int BuildSelect( media_library_t *p_ml,
                         psz_on2 == NULL ? "" : " AND " );
             }
         }
-        if( join == true )
+        if( join )
         {
             if( psz_peoplerole && *psz_peoplerole )
             {
index 1aba7daaff1a5dc243c037687307bed8cc7f211f..f5c2b12357db32e58b8d2b2efd650c984db21bda 100644 (file)
@@ -753,7 +753,7 @@ static void CloseClient (vlc_object_t *obj)
     tls_session_t *client = (tls_session_t *)obj;
     tls_client_sys_t *p_sys = (tls_client_sys_t *)(client->p_sys);
 
-    if (p_sys->session.b_handshaked == true)
+    if (p_sys->session.b_handshaked)
         gnutls_bye (p_sys->session.session, GNUTLS_SHUT_WR);
     gnutls_deinit (p_sys->session.session);
     /* credentials must be free'd *after* gnutls_deinit() */
@@ -902,7 +902,7 @@ gnutls_SessionClose (tls_server_t *p_server, tls_session_t *p_session)
     tls_session_sys_t *p_sys = p_session->p_sys;
     (void)p_server;
 
-    if( p_sys->b_handshaked == true )
+    if( p_sys->b_handshaked )
         gnutls_bye( p_sys->session, GNUTLS_SHUT_WR );
     gnutls_deinit( p_sys->session );
 
index 2356593f142d66f03f9b48870ee3b647ec5885ae..2bf12af5e282fa7bbf685037dac0ccd8189e148a 100644 (file)
@@ -236,7 +236,7 @@ static int RegisterToGrowl( vlc_object_t *p_this )
     psz_encoded[4] = j;
     for( j = 0 ; psz_notifications[j] != NULL ; j++)
     {
-        if(pb_defaults[j] == true)
+        if(pb_defaults[j])
         {
             psz_encoded[i++] = (uint8_t)j;
             i_defaults++;
index ca3e44995a43277f80ee93188516705e1f3a26d5..d91442be4c4e247e5bd6fd6792ff7e19e34cf757 100644 (file)
@@ -1086,7 +1086,7 @@ static void Atmo_Shutdown(filter_t *p_filter)
 {
     filter_sys_t *p_sys = p_filter->p_sys;
 
-    if(p_sys->b_enabled == true)
+    if(p_sys->b_enabled)
     {
         msg_Dbg( p_filter, "shut down atmo!");
         /*
@@ -2252,7 +2252,7 @@ static void CreateMiniImage( filter_t *p_filter, picture_t *p_inpic)
     /*
     if debugging enabled save every 128th image to disk
     */
-    if((p_sys->b_saveframes == true) && (p_sys->sz_framepath[0] != 0 ))
+    if(p_sys->b_saveframes && p_sys->sz_framepath[0] != 0 )
     {
 
         if((p_sys->ui_frame_counter & 127) == 0)
@@ -2301,9 +2301,8 @@ static picture_t * Filter( filter_t *p_filter, picture_t *p_pic )
     
     vlc_mutex_lock( &p_sys->filter_lock );
 
-    if((p_sys->b_enabled == true) &&
-        (p_sys->pf_extract_mini_image != NULL) &&
-        (p_sys->b_pause_live == false))
+    if(p_sys->b_enabled && p_sys->pf_extract_mini_image &&
+       !p_sys->b_pause_live)
     {
         p_sys->i_crop_x_offset  = p_filter->fmt_in.video.i_x_offset;
         p_sys->i_crop_y_offset  = p_filter->fmt_in.video.i_y_offset;
@@ -2458,7 +2457,7 @@ static int StateCallback( vlc_object_t *p_this, char const *psz_cmd,
     filter_t *p_filter = (filter_t *)p_data;
     filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
 
-    if((p_sys->b_usepausecolor == true) && (p_sys->b_enabled == true))
+    if(p_sys->b_usepausecolor && p_sys->b_enabled)
     {
         msg_Dbg(p_filter, "state change from: %"PRId64" to %"PRId64, oldval.i_int,
             newval.i_int);
index a3a439bdfbe96200762164bba6184165ed153a3c..43843da3b49c3fce4c746cfa6b0cd37c29752448 100644 (file)
@@ -1785,7 +1785,7 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
 
            Note that now p_dst[i] != NULL for 0 <= i < i_double_rate_alloc_end. */
     }
-    assert( p_sys->b_double_rate == true  ||  p_dst[1] == NULL );
+    assert( p_sys->b_double_rate  ||  p_dst[1] == NULL );
     assert( i_nb_fields > 2  ||  p_dst[2] == NULL );
 
     /* Render */
index d389893bc6f8e8e3af93a072af20b0df9273e04b..c7d20bb065f6f0a9645eeff030e2f26a221191c6 100644 (file)
@@ -273,8 +273,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
             p_cmddesc->p_command->pf_parser( p_cmd, p_end,
                                              &p_cmddesc->params );
 
-            if( ( p_cmddesc->p_command->b_atomic == true ) &&
-                ( p_sys->b_atomic == true ) )
+            if( p_cmddesc->p_command->b_atomic && p_sys->b_atomic )
                 QueueEnqueue( &p_sys->atomic, p_cmddesc );
             else
                 QueueEnqueue( &p_sys->pending, p_cmddesc );
index d119ed3290b221758e8dd12ab447eaf3c44c8a4a..a7d3b477ab139f637655ea5c1de48e7235c73aa8 100644 (file)
@@ -664,7 +664,7 @@ static int exec_GetVisibility( filter_t *p_filter,
     if( p_ovl == NULL )
         return VLC_EGENERIC;
 
-    p_results->b_visible = ( p_ovl->b_active == true ) ? 1 : 0;
+    p_results->b_visible = p_ovl->b_active ? 1 : 0;
     return VLC_SUCCESS;
 }
 
index 66ad130a1b4c644c2dea294adce25256609b852b..ff620a5728420d48918993cece9640f8fb815330 100644 (file)
@@ -130,7 +130,7 @@ overlay_t *ListWalk( list_t *p_list )
     for( ; pp_cur < p_list->pp_tail; ++pp_cur )
     {
         if( ( *pp_cur != NULL ) &&
-            ( (*pp_cur)->b_active == true )&&
+            ( (*pp_cur)->b_active )&&
             ( (*pp_cur)->format.i_chroma != VLC_FOURCC( '\0','\0','\0','\0') ) )
         {
             return *pp_cur;
index cd1b28453e4813530366f501ef07abeb1b14de6b..e5319556eacbb4ead4a7d3e06553a987a2eb19d7 100644 (file)
@@ -1012,7 +1012,7 @@ static bool process_server_message ( filter_t *p_filter,
             msg->scme.nColours = htons(msg->scme.nColours);
             msg->scme.firstColour = htons(msg->scme.firstColour);
             int i_datasize;
-            if ( p_sys->b_alpha_from_vnc == true )
+            if ( p_sys->b_alpha_from_vnc )
             {
                 i_datasize = 2 * msg->scme.nColours * 4;
             }
@@ -1041,7 +1041,7 @@ static bool process_server_message ( filter_t *p_filter,
             for (int i = 0; i < msg->scme.nColours; i++)
             {
                 i_color_index = i+msg->scme.firstColour;
-                if ( p_sys->b_alpha_from_vnc == true )
+                if ( p_sys->b_alpha_from_vnc )
                 {
                     i_alpha = p_sys->read_buffer[i_offset];
                     i_offset += 2;
index 070754afcdddec1ec02c0d62ea50ffd5f441aa6b..83990ed61ef8f59f0b6b1e018b222885fa1966b5 100644 (file)
@@ -472,7 +472,7 @@ static void* Manage( void* p_object )
         {
             mtime_t i_real_date = vlm->schedule[i]->i_date;
 
-            if( vlm->schedule[i]->b_enabled == true )
+            if( vlm->schedule[i]->b_enabled )
             {
                 if( vlm->schedule[i]->i_date == 0 ) // now !
                 {
index d1c51ba4320688935da8135fab9f48e19d3642de..1656c28e4ae9073253950b1cc1c764f35d44b533 100644 (file)
@@ -1592,12 +1592,12 @@ static char *Save( vlm_t *vlm )
         else
             i_length += strlen( "new * broadcast " ) + strlen(p_cfg->psz_name);
 
-        if( p_cfg->b_enabled == true )
+        if( p_cfg->b_enabled )
             i_length += strlen( "enabled" );
         else
             i_length += strlen( "disabled" );
 
-        if( !p_cfg->b_vod && p_cfg->broadcast.b_loop == true )
+        if( !p_cfg->b_vod && p_cfg->broadcast.b_loop )
             i_length += strlen( " loop\n" );
         else
             i_length += strlen( "\n" );
@@ -1621,7 +1621,7 @@ static char *Save( vlm_t *vlm )
 
         i_length += strlen( "new  schedule " ) + strlen( schedule->psz_name );
 
-        if( schedule->b_enabled == true )
+        if( schedule->b_enabled )
         {
             i_length += strlen( "date //-:: enabled\n" ) + 14;
         }
@@ -1712,7 +1712,7 @@ static char *Save( vlm_t *vlm )
         localtime_r( &i_time, &date);
         p += sprintf( p, "new %s schedule ", schedule->psz_name);
 
-        if( schedule->b_enabled == true )
+        if( schedule->b_enabled )
         {
             p += sprintf( p, "date %d/%d/%d-%d:%d:%d enabled\n",
                           date.tm_year + 1900, date.tm_mon + 1, date.tm_mday,
index 1d4a1d579fef375d566a6556c783cbfbef7a61c7..dabca3197ce7c20b4a6528a438f53d708e5376ba 100644 (file)
@@ -799,7 +799,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
 #if defined(MEDIA_LIBRARY)
     /* Get the ML */
-    if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) == true )
+    if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) )
     {
         priv->p_ml = ml_Create( VLC_OBJECT( p_libvlc ), NULL );
         if( !priv->p_ml )
index 77e123584f16969d8314de77edc1479511c7c4a5..293f8db057da107202fddf9cb2ac72863012b362 100644 (file)
@@ -289,7 +289,7 @@ void stats_TimerStart( vlc_object_t *p_obj, const char *psz_name,
                      p_counter->i_samples, p_sample );
         p_sample->date = 0; p_sample->value.i_int = 0;
     }
-    if( p_counter->pp_samples[0]->value.b_bool == true )
+    if( p_counter->pp_samples[0]->value.b_bool )
     {
         msg_Warn( p_obj, "timer '%s' was already started !", psz_name );
         goto out;
@@ -568,7 +568,7 @@ static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
     }
     i_total = p_counter->pp_samples[1]->value.i_int;
     total = p_counter->pp_samples[1]->date;
-    if( p_counter->pp_samples[0]->value.b_bool == true )
+    if( p_counter->pp_samples[0]->value.b_bool )
     {
         last = mdate() - p_counter->pp_samples[0]->date;
         i_total += 1;