mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 07:26:15 +01:00
Do not shadow global variable
This commit is contained in:
12
src/util.cpp
12
src/util.cpp
@@ -601,19 +601,19 @@ bool TryCreateDirectory(const boost::filesystem::path& p)
|
||||
return false;
|
||||
}
|
||||
|
||||
void FileCommit(FILE *fileout)
|
||||
void FileCommit(FILE *file)
|
||||
{
|
||||
fflush(fileout); // harmless if redundantly called
|
||||
fflush(file); // harmless if redundantly called
|
||||
#ifdef WIN32
|
||||
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout));
|
||||
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(file));
|
||||
FlushFileBuffers(hFile);
|
||||
#else
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
fdatasync(fileno(fileout));
|
||||
fdatasync(fileno(file));
|
||||
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
fcntl(fileno(fileout), F_FULLFSYNC, 0);
|
||||
fcntl(fileno(file), F_FULLFSYNC, 0);
|
||||
#else
|
||||
fsync(fileno(fileout));
|
||||
fsync(fileno(file));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user