]> git.sesse.net Git - x264/commitdiff
filters: fix sizeof mismatch
authorTristan Matthews <le.businessman@gmail.com>
Thu, 17 Jul 2014 04:03:50 +0000 (00:03 -0400)
committerFiona Glaser <fiona@x264.com>
Tue, 26 Aug 2014 16:19:17 +0000 (09:19 -0700)
filters/filters.c

index 1ea888ce54f99d12741be840e2d9744d72566fdf..079297cbfbcdd7befb27c7610438b25ef970c1b9 100644 (file)
@@ -38,13 +38,13 @@ char **x264_split_string( char *string, char *sep, int limit )
     if( sep_count == 0 )
     {
         if( string[0] == '\0' )
-            return calloc( 1, sizeof( char** ) );
-        char **ret = calloc( 2, sizeof( char** ) );
+            return calloc( 1, sizeof( char* ) );
+        char **ret = calloc( 2, sizeof( char* ) );
         ret[0] = strdup( string );
         return ret;
     }
 
-    char **split = calloc( ( limit > 0 ? limit : sep_count ) + 2, sizeof(char**) );
+    char **split = calloc( ( limit > 0 ? limit : sep_count ) + 2, sizeof(char*) );
     int i = 0;
     char *str = strdup( string );
     assert( str );
@@ -104,7 +104,7 @@ char **x264_split_options( const char *opt_str, const char *options[] )
     while( options[options_count] != NULL )
         ++options_count;
 
-    char **opts = calloc( split_count * 2 + 2, sizeof( char ** ) );
+    char **opts = calloc( split_count * 2 + 2, sizeof( char * ) );
     char **arg = NULL;
     int opt = 0, found_named = 0, invalid = 0;
     for( int i = 0; split[i] != NULL; i++, invalid = 0 )