[x264-devel] filters: fix sizeof mismatch
Tristan Matthews
git at videolan.org
Tue Aug 26 18:23:10 CEST 2014
x264 | branch: master | Tristan Matthews <le.businessman at gmail.com> | Thu Jul 17 00:03:50 2014 -0400| [021c0dc6c95c1bc239c9db78a80dd85fc856a4dd] | committer: Fiona Glaser
filters: fix sizeof mismatch
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=021c0dc6c95c1bc239c9db78a80dd85fc856a4dd
---
filters/filters.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/filters/filters.c b/filters/filters.c
index 1ea888c..079297c 100644
--- a/filters/filters.c
+++ b/filters/filters.c
@@ -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 )
More information about the x264-devel
mailing list