[vlc-commits] bluray: don't reinvent strdup

Rafaël Carré git at videolan.org
Fri Aug 16 13:26:08 CEST 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Aug 12 09:16:13 2013 +0200| [7a55843947e526d402356dd72e42f307790f767e] | committer: Rafaël Carré

bluray: don't reinvent strdup

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

 modules/access/bluray.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index e458163..d1edef9 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -249,9 +249,8 @@ static int blurayOpen( vlc_object_t *object )
     TAB_INIT( p_sys->i_title, p_sys->pp_title );
 
     /* store current bd path */
-    if (p_demux->psz_file) {
-        p_sys->psz_bd_path = strndup(p_demux->psz_file, strlen(p_demux->psz_file));
-    }
+    if (p_demux->psz_file)
+        p_sys->psz_bd_path = strdup(p_demux->psz_file);
 
     /* If we're passed a block device, try to convert it to the mount point. */
     FindMountPoint(&p_sys->psz_bd_path);



More information about the vlc-commits mailing list