[vlc-devel] [PATCH 03/11] playlist/item: playlist_AddInput: merge declaration + initialization

Filip Roséen filip at atch.se
Thu May 18 12:01:10 CEST 2017


---
 src/playlist/item.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/playlist/item.c b/src/playlist/item.c
index fe8b87ad49..a19a3834f1 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -476,11 +476,9 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
 int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
                        bool play_now, bool b_playlist )
 {
-    playlist_item_t *item;
-
     PL_LOCK;
-    item = b_playlist ? p_playlist->p_playing
-                      : p_playlist->p_media_library;
+    playlist_item_t *item = b_playlist ? p_playlist->p_playing
+                                       : p_playlist->p_media_library;
 
     item = playlist_NodeAddInput( p_playlist, p_input, item, PLAYLIST_END );
 
-- 
2.12.2


More information about the vlc-devel mailing list