fflush() followed by fclose() is redundant
Change-Id: Iacb9332635cb6afa90ec1a72e96388b3b5b7b56c Reviewed-on: https://gerrit.libreoffice.org/52420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
8d6e498a11
commit
786a1c8ef1
@@ -202,9 +202,8 @@ bool copyFile(const OString* source, const OString& target)
|
||||
if (source != nullptr) {
|
||||
fclose(pSource);
|
||||
}
|
||||
if ( fflush(pTarget) )
|
||||
if ( fclose(pTarget) )
|
||||
bRet = false;
|
||||
fclose(pTarget);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
@@ -129,7 +129,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
|
||||
fprintf( fp, "[%p]\n", *pFramePtr );
|
||||
}
|
||||
|
||||
fflush( fp );
|
||||
fclose( fp );
|
||||
}
|
||||
}
|
||||
@@ -209,7 +208,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
|
||||
}
|
||||
fprintf( fp, "[%p]\n", *pFramePtr );
|
||||
}
|
||||
fflush( fp );
|
||||
fclose( fp );
|
||||
}
|
||||
}
|
||||
@@ -277,7 +275,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
|
||||
fprintf( fp, "[%p]\n", *pFramePtr );
|
||||
}
|
||||
|
||||
fflush( fp );
|
||||
fclose( fp );
|
||||
}
|
||||
}
|
||||
|
@@ -131,7 +131,6 @@ void exportToFile(
|
||||
|
||||
FILE * f = ::fopen( fname, "w" );
|
||||
::fwrite( bytes.getConstArray(), 1, bytes.getLength(), f );
|
||||
::fflush( f );
|
||||
::fclose( f );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user