[vlc-devel] commit: Compare input item pointers, no need to deref here ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 16 19:27:53 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 16 20:17:13 2009 +0300| [df4999e38938089f6b4550b16d880e6cff1ab6b4] | committer: Rémi Denis-Courmont 

Compare input item pointers, no need to deref here

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df4999e38938089f6b4550b16d880e6cff1ab6b4
---

 modules/control/http/util.c |    2 +-
 src/playlist/item.c         |    4 ++--
 src/playlist/search.c       |    2 +-
 src/playlist/tree.c         |    8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/control/http/util.c b/modules/control/http/util.c
index 69de4a6..053e3ff 100644
--- a/modules/control/http/util.c
+++ b/modules/control/http/util.c
@@ -349,7 +349,7 @@ void PlaylistListNode( intf_thread_t *p_intf, playlist_t *p_pl,
             return;
 
         mvar_t *itm = mvar_New( name, "set" );
-        if( p_item->p_input->i_id == p_node->p_input->i_id )
+        if( p_item->p_input == p_node->p_input )
             mvar_AppendNewVar( itm, "current", "1" );
         else
             mvar_AppendNewVar( itm, "current", "0" );
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 4f8b2cd..19e9799 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -481,8 +481,8 @@ int playlist_BothAddInput( playlist_t *p_playlist,
     }
     for( i_top = 0 ; i_top < p_playlist->p_root_onelevel->i_children; i_top++ )
     {
-        if( p_playlist->p_root_onelevel->pp_children[i_top]->p_input->i_id ==
-                             p_up->p_input->i_id )
+        if( p_playlist->p_root_onelevel->pp_children[i_top]->p_input ==
+                             p_up->p_input )
         {
             AddItem( p_playlist, p_item_one,
                      p_playlist->p_root_onelevel->pp_children[i_top],
diff --git a/src/playlist/search.c b/src/playlist/search.c
index 262138f..8de86c6 100644
--- a/src/playlist/search.c
+++ b/src/playlist/search.c
@@ -71,7 +71,7 @@ playlist_item_t* playlist_ItemGetByInput( playlist_t * p_playlist,
     /** \todo Check if this is always incremental and whether we can bsearch */
     for( i =  0 ; i < p_playlist->all_items.i_size; i++ )
     {
-        if( ARRAY_VAL(p_playlist->all_items, i)->p_input->i_id == p_item->i_id )
+        if( ARRAY_VAL(p_playlist->all_items, i)->p_input == p_item )
         {
             return ARRAY_VAL(p_playlist->all_items, i);
         }
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 1eab637..32ef051 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -311,8 +311,8 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
             return p_node;
         for( i = 0 ; i< p_playlist->p_root_onelevel->i_children; i++ )
         {
-            if( p_playlist->p_root_onelevel->pp_children[i]->p_input->i_id ==
-                    p_node->p_input->i_id )
+            if( p_playlist->p_root_onelevel->pp_children[i]->p_input ==
+                    p_node->p_input )
                 return p_playlist->p_root_onelevel->pp_children[i];
         }
     }
@@ -322,8 +322,8 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
             return p_node;
         for( i = 0 ; i< p_playlist->p_root_category->i_children; i++ )
         {
-            if( p_playlist->p_root_category->pp_children[i]->p_input->i_id ==
-                    p_node->p_input->i_id )
+            if( p_playlist->p_root_category->pp_children[i]->p_input ==
+                    p_node->p_input )
                 return p_playlist->p_root_category->pp_children[i];
         }
     }




More information about the vlc-devel mailing list