[vlc-commits] playlist/item: playlist_AddExt: merge declaration + initialization
Filip Roséen
git at videolan.org
Thu May 18 17:51:24 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:01:11 2017 +0200| [2cb683e37966cdd24540f7f2c0a99ab9d1de3942] | committer: Rémi Denis-Courmont
playlist/item: playlist_AddExt: merge declaration + initialization
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cb683e37966cdd24540f7f2c0a99ab9d1de3942
---
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 b299837f02..f7e606b6cb 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;
}
More information about the vlc-commits
mailing list