Kaydet (Commit) 786a1c8e authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Noel Grandin

fflush() followed by fclose() is redundant

Change-Id: Iacb9332635cb6afa90ec1a72e96388b3b5b7b56c
Reviewed-on: https://gerrit.libreoffice.org/52420Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8d6e498a
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment