[vlc-devel] commit: Remove dead code (CID #2) ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jul 1 22:10:09 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Jul  1 23:12:03 2008 +0300| [fe5605fa2171af4bbeaa3f63b0218698da07e2e3]

Remove dead code (CID #2)

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

 modules/access/vcd/cdrom.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c
index ddf5e39..072cccf 100644
--- a/modules/access/vcd/cdrom.c
+++ b/modules/access/vcd/cdrom.c
@@ -828,17 +828,9 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
     {
         /* psz_dev must be the cue file. Let's assume there's a .bin
          * file with the same filename */
-        if( p_pos )
-        {
-            psz_vcdfile = malloc( p_pos - psz_dev + 5 /* ".bin" */ );
-            strncpy( psz_vcdfile, psz_dev, p_pos - psz_dev );
-            strcpy( psz_vcdfile + (p_pos - psz_dev), ".bin");
-        }
-        else
-        {
-            psz_vcdfile = malloc( strlen(psz_dev) + 5 /* ".bin" */ );
-            sprintf( psz_vcdfile, "%s.bin", psz_dev );
-        }
+        psz_vcdfile = malloc( p_pos - psz_dev + 5 /* ".bin" */ );
+        strncpy( psz_vcdfile, psz_dev, p_pos - psz_dev );
+        strcpy( psz_vcdfile + (p_pos - psz_dev), ".bin");
         psz_cuefile = strdup( psz_dev );
     }
     else




More information about the vlc-devel mailing list