[vlc-commits] demux/playlist/itml: free_track: simplify

Filip Roséen git at videolan.org
Mon May 22 00:16:01 CEST 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Sun May 21 20:49:05 2017 +0200| [2c2568c37000d243eeeeff56a4e6fd0bdae1ed23] | committer: Marvin Scholz

demux/playlist/itml: free_track: simplify

There is no need for FREENULL of the data-members when the whole
object is being deallocated directly after.

Signed-off-by: Marvin Scholz <epirat07 at gmail.com>

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

 modules/demux/playlist/itml.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/modules/demux/playlist/itml.c b/modules/demux/playlist/itml.c
index 5a5eb3b048..fda2e102bc 100644
--- a/modules/demux/playlist/itml.c
+++ b/modules/demux/playlist/itml.c
@@ -366,13 +366,12 @@ static void free_track( track_elem_t *p_track )
     if ( !p_track )
         return;
 
-    FREENULL( p_track->name );
-    FREENULL( p_track->artist );
-    FREENULL( p_track->album );
-    FREENULL( p_track->genre );
-    FREENULL( p_track->trackNum );
-    FREENULL( p_track->location );
-    p_track->duration = 0;
+    free( p_track->name );
+    free( p_track->artist );
+    free( p_track->album );
+    free( p_track->genre );
+    free( p_track->trackNum );
+    free( p_track->location );
     free( p_track );
 }
 



More information about the vlc-commits mailing list