Commit cee4a2ad authored by Fabian Müller's avatar Fabian Müller
Browse files

Fix calloc argument order

parent a8d5bafd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -820,7 +820,7 @@ int16_t make_dirs( const char *const pathname )

    if ( sep != 0 )
    {
        temp = calloc( 1, strlen( pathname ) + 1 );
        temp = calloc( strlen( pathname ) + 1, sizeof( char ) );
        p = pathname;
        while ( ( p = strchr( p, sep ) ) != NULL )
        {
+2 −2
Original line number Diff line number Diff line
@@ -69,9 +69,9 @@ ivas_error aeidFileReader_open(
        return IVAS_ERR_FAILED_FILE_OPEN;
    }

    self = calloc( sizeof( aeidFileReader ), 1 );
    self = calloc( 1, sizeof( aeidFileReader ) );
    self->aeidFile = aeidFile;
    self->file_path = calloc( sizeof( char ), strlen( aeidFilePath ) + 1 );
    self->file_path = calloc( strlen( aeidFilePath ) + 1, sizeof( char ) );
    strcpy( self->file_path, aeidFilePath );

    *aeidReader = self;
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ ivas_error AudioFileReader_open(
    {
        return IVAS_ERR_FAILED_FILE_OPEN;
    }
    self = calloc( sizeof( AudioFileReader ), 1 );
    self = calloc( 1, sizeof( AudioFileReader ) );
    self->samplingRate = 0;
    self->numChannels = 0;

+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ ivas_error AudioFileWriter_open(
        return IVAS_ERR_FAILED_FILE_OPEN;
    }

    self = calloc( sizeof( AudioFileWriter ), 1 );
    self = calloc( 1, sizeof( AudioFileWriter ) );
    if ( self == NULL )
    {
        return IVAS_ERR_FAILED_ALLOC;
+2 −2
Original line number Diff line number Diff line
@@ -83,9 +83,9 @@ ivas_error hrtfFileReader_open(
        return IVAS_ERR_FAILED_FILE_OPEN;
    }

    self = calloc( sizeof( hrtfFileReader ), 1 );
    self = calloc( 1, sizeof( hrtfFileReader ) );
    self->file = file;
    self->file_path = calloc( sizeof( char ), strlen( filePath ) + 1 );
    self->file_path = calloc( strlen( filePath ) + 1, sizeof( char ) );
    strcpy( self->file_path, filePath );

    *hrtfReader = self;
Loading