Loading lib_util/ivas_rtp_file.c +11 −9 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ struct IVAS_RTP_FILE FILE *f_rtpstream; }; static bool file_exists( char *filename ) static bool file_exists( const char *filename ) { struct stat buffer; return ( stat( filename, &buffer ) == 0 ); Loading @@ -55,17 +55,19 @@ static ivas_error IvasRtpFile_Open( IVAS_RTP_FILE_HANDLE *phRtpFile /* o : pointer to an IVAS file reader handle */ ) { const char *mode; FILE *f_rtpstream; if ( file_exists( filePath ) ) { mode = isFileWriter ? "ab" : "rb"; char *mode = isFileWriter ? "ab" : "rb"; fprintf( stderr, "Warning: Rtp file %s already exists, opening in append mode\n", filePath ); f_rtpstream = fopen( filePath, mode ); } else { mode = isFileWriter ? "wb" : "rb"; char *mode = isFileWriter ? "wb" : "rb"; f_rtpstream = fopen( filePath, mode ); } FILE *f_rtpstream = fopen( filePath, mode ); if ( f_rtpstream == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_FILE_OPEN, "could not open: %s\n", filePath ); Loading apps/encoder_fmtsw.c +1 −1 File changed.Contains only whitespace changes. Show changes Loading
lib_util/ivas_rtp_file.c +11 −9 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ struct IVAS_RTP_FILE FILE *f_rtpstream; }; static bool file_exists( char *filename ) static bool file_exists( const char *filename ) { struct stat buffer; return ( stat( filename, &buffer ) == 0 ); Loading @@ -55,17 +55,19 @@ static ivas_error IvasRtpFile_Open( IVAS_RTP_FILE_HANDLE *phRtpFile /* o : pointer to an IVAS file reader handle */ ) { const char *mode; FILE *f_rtpstream; if ( file_exists( filePath ) ) { mode = isFileWriter ? "ab" : "rb"; char *mode = isFileWriter ? "ab" : "rb"; fprintf( stderr, "Warning: Rtp file %s already exists, opening in append mode\n", filePath ); f_rtpstream = fopen( filePath, mode ); } else { mode = isFileWriter ? "wb" : "rb"; char *mode = isFileWriter ? "wb" : "rb"; f_rtpstream = fopen( filePath, mode ); } FILE *f_rtpstream = fopen( filePath, mode ); if ( f_rtpstream == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_FILE_OPEN, "could not open: %s\n", filePath ); Loading