changeset 24456:41c163b6bea4

Get rid of some quite pointless variables
author reimar
date Fri, 14 Sep 2007 17:00:09 +0000
parents 3ae0e3067f99
children fd8830d276ca
files libmpdemux/demux_ty.c
diffstat 1 files changed, 2 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ty.c	Fri Sep 14 16:58:31 2007 +0000
+++ b/libmpdemux/demux_ty.c	Fri Sep 14 17:00:09 2007 +0000
@@ -138,11 +138,9 @@
    char    *sizestr;
    int     size;
    int     count;
-   int     done;
    off_t   offset;
    off_t   totalsize;
    off_t   skip;
-   int     error = 0;
    int     parts = 0;
    int     isty;
    int     index;
@@ -151,29 +149,21 @@
    offset = 0;
    totalsize = demux->stream->end_pos;
 
-   done = 0;
    mp_msg( MSGT_DEMUX, MSGL_DBG3, "Dumping tar contents\n" );
-   while ( done == 0 )
+   while (1)
    {
       ok = stream_seek( demux->stream, offset );
       if ( offset + 512 == totalsize )
-      {
-         done = 1;
          break;
-      }
       if ( ok == 0 )
       { 
          mp_msg( MSGT_DEMUX, MSGL_DBG3, "Seek bad %"PRId64"\n", (int64_t)offset );
-         done = 1;
-         error = 1;
          break;
       }
       count = stream_read( demux->stream, header, 512 );
       if ( count < 512 )
       { 
          mp_msg( MSGT_DEMUX, MSGL_DBG3, "Read bad\n" );
-         done = 1;
-         error = 1;
          break;
       }
       name = header;
@@ -229,16 +219,10 @@
       }
 
       if ( ( offset + skip ) > totalsize )
-      {
-         done = 1;
-         error = 1;
-      }
+         break;
       else
          offset += skip;
    }
-   if ( error )
-      mp_msg( MSGT_DEMUX, MSGL_DBG3, 
-         "WARNING : tmf parse error, not intact\n" );
    tivo->tmf_totalparts = parts;
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
       "tmf_filetoparts(): No More Part Files %d\n", parts );