[vlc-devel] [PATCH 3/3] demux/playlist/itml: new_track: minor clean-up

Filip Roséen filip at atch.se
Wed Mar 15 10:10:14 CET 2017


---
 modules/demux/playlist/itml.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/playlist/itml.c b/modules/demux/playlist/itml.c
index 2c9a0b72fe..7e7dfc6399 100644
--- a/modules/demux/playlist/itml.c
+++ b/modules/demux/playlist/itml.c
@@ -344,9 +344,8 @@ static bool parse_track_dict( demux_t *p_demux, input_item_node_t *p_input_node,
 
 static track_elem_t *new_track()
 {
-    track_elem_t *p_track;
-    p_track = malloc( sizeof( track_elem_t ) );
-    if( p_track )
+    track_elem_t *p_track = malloc( sizeof *p_track );
+    if( likely( p_track ) )
     {
         p_track->name = NULL;
         p_track->artist = NULL;
-- 
2.12.0


More information about the vlc-devel mailing list