[vlc-devel] [PATCH 04/11] playlist/item: playlist_AddExt: merge declaration + initialization
Filip Roséen
filip at atch.se
Thu May 18 12:01:11 CEST 2017
---
src/playlist/item.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/playlist/item.c b/src/playlist/item.c
index a19a3834f1..8cdf525513 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -452,14 +452,11 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
unsigned i_option_flags,
bool b_playlist )
{
- int i_ret;
- input_item_t *p_input;
-
- p_input = input_item_New( psz_uri, psz_name );
- if( p_input == NULL )
+ input_item_t *p_input = input_item_New( psz_uri, psz_name );
+ if( !p_input )
return VLC_ENOMEM;
input_item_AddOptions( p_input, i_options, ppsz_options, i_option_flags );
- i_ret = playlist_AddInput( p_playlist, p_input, play_now, b_playlist );
+ int i_ret = playlist_AddInput( p_playlist, p_input, play_now, b_playlist );
input_item_Release( p_input );
return i_ret;
}
--
2.12.2
More information about the vlc-devel
mailing list