idlc/source/idlccompile.cxx | 3 +-- sal/osl/unx/backtrace.c | 3 --- xmlscript/test/imexp.cxx | 1 - 3 files changed, 1 insertion(+), 6 deletions(-)
New commits: commit 786a1c8ef1d182e63a7ae8cfd526ae101bad232b Author: Takeshi Abe <t...@fixedpoint.jp> Date: Thu Apr 5 00:39:05 2018 +0900 fflush() followed by fclose() is redundant Change-Id: Iacb9332635cb6afa90ec1a72e96388b3b5b7b56c Reviewed-on: https://gerrit.libreoffice.org/52420 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index c7e69362ec8a..ca6a8ebeb10a 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -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; } diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c index f70031d0b4a9..a3aeb3dae3f8 100644 --- a/sal/osl/unx/backtrace.c +++ b/sal/osl/unx/backtrace.c @@ -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 ); } } diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index e275179beef1..0e4a80b516d5 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -131,7 +131,6 @@ void exportToFile( FILE * f = ::fopen( fname, "w" ); ::fwrite( bytes.getConstArray(), 1, bytes.getLength(), f ); - ::fflush( f ); ::fclose( f ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits