[vlc-commits] codec: cc: use size_t

Francois Cartegnie git at videolan.org
Tue Sep 26 22:44:07 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Sep 26 22:27:46 2017 +0200| [6c9651f1fd83ffdda04a7e2d47b8ae30049001d4] | committer: Francois Cartegnie

codec: cc: use size_t

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

 modules/codec/cc.h | 2 +-
 modules/demux/ty.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/cc.h b/modules/codec/cc.h
index 7af03b22f8..2caea83218 100644
--- a/modules/codec/cc.h
+++ b/modules/codec/cc.h
@@ -56,7 +56,7 @@ typedef struct
      *  byte[x+1]: cc data 1
      *  byte[x+2]: cc data 2
      */
-    int     i_data;
+    size_t  i_data;
     uint8_t p_data[CC_MAX_DATA_SIZE];
 } cc_data_t;
 
diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index 86115504ea..67f7aca70b 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -166,7 +166,7 @@ typedef enum
 typedef struct
 {
     bool b_started;
-    int        i_data;
+    size_t     i_data;
     uint8_t    p_data[XDS_MAX_DATA_SIZE];
     int        i_sum;
 } xds_packet_t;
@@ -1116,10 +1116,10 @@ static void XdsExit( xds_t *h )
     free( h->meta.future.psz_name );
     free( h->meta.future.psz_rating );
 }
-static void XdsStringUtf8( char dst[2*32+1], const uint8_t *p_src, int i_src )
+static void XdsStringUtf8( char dst[2*32+1], const uint8_t *p_src, size_t i_src )
 {
-    int i_dst = 0;
-    for( int i = 0; i < i_src; i++ )
+    size_t i_dst = 0;
+    for( size_t i = 0; i < i_src; i++ )
     {
         switch( p_src[i] )
         {



More information about the vlc-commits mailing list