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

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


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

Remove dead code (CID #2)
(cherry picked from commit fe5605fa2171af4bbeaa3f63b0218698da07e2e3)

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

 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 0ad0cdf..ee92899 100644
--- a/modules/access/vcd/cdrom.c
+++ b/modules/access/vcd/cdrom.c
@@ -843,17 +843,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