aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-09-21 14:13:33 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-09-21 14:13:44 +0200
commitcf5ebaa921a939cc3a81948a559c1f1ab53d68b6 (patch)
tree9b9b0c5d64ef6a2e83b4fd4a1faf59b7cf9098ab /src/util.cpp
parentfec6af744014d60242bf9ea0d343e3295e6e091a (diff)
parent7c069a70931a6bb27d060927765146d4c6ceced4 (diff)
Merge #8656: Trivial: Do not shadow global variable fileout
7c069a7 Do not shadow global variable (Pavel Janík)
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp
index c7d147a11e..93cc0412b5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -600,19 +600,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
}