Commit df4999e3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Compare input item pointers, no need to deref here

parent 6bbc4b99
......@@ -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" );
......
......@@ -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],
......
......@@ -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);
}
......
......@@ -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];
}
}
......
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