[vlc-commits] demux/playlist/itml: new_track: minor clean-up

Filip Roséen git at videolan.org
Wed Mar 15 19:33:27 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar 15 10:10:14 2017 +0100| [9022c3a6bd764aadb6a6ec96e577b97b380d8aa3] | committer: Jean-Baptiste Kempf

demux/playlist/itml: new_track: minor clean-up

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9022c3a6bd764aadb6a6ec96e577b97b380d8aa3
---

 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 2c9a0b7..7e7dfc6 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;



More information about the vlc-commits mailing list