Skip to content

Commit 7c069a7

Browse files
committed
Do not shadow global variable
1 parent cbe9ae8 commit 7c069a7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/util.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,19 +601,19 @@ bool TryCreateDirectory(const boost::filesystem::path& p)
601601
return false;
602602
}
603603

604-
void FileCommit(FILE *fileout)
604+
void FileCommit(FILE *file)
605605
{
606-
fflush(fileout); // harmless if redundantly called
606+
fflush(file); // harmless if redundantly called
607607
#ifdef WIN32
608-
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout));
608+
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(file));
609609
FlushFileBuffers(hFile);
610610
#else
611611
#if defined(__linux__) || defined(__NetBSD__)
612-
fdatasync(fileno(fileout));
612+
fdatasync(fileno(file));
613613
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
614-
fcntl(fileno(fileout), F_FULLFSYNC, 0);
614+
fcntl(fileno(file), F_FULLFSYNC, 0);
615615
#else
616-
fsync(fileno(fileout));
616+
fsync(fileno(file));
617617
#endif
618618
#endif
619619
}

src/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ bool error(const char* fmt, const Args&... args)
9393

9494
void PrintExceptionContinue(const std::exception *pex, const char* pszThread);
9595
void ParseParameters(int argc, const char*const argv[]);
96-
void FileCommit(FILE *fileout);
96+
void FileCommit(FILE *file);
9797
bool TruncateFile(FILE *file, unsigned int length);
9898
int RaiseFileDescriptorLimit(int nMinFD);
9999
void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length);

0 commit comments

Comments
 (0)