Skip to content

Commit cf5ebaa

Browse files
committed
Merge #8656: Trivial: Do not shadow global variable fileout
7c069a7 Do not shadow global variable (Pavel Janík)
2 parents fec6af7 + 7c069a7 commit cf5ebaa

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
@@ -600,19 +600,19 @@ bool TryCreateDirectory(const boost::filesystem::path& p)
600600
return false;
601601
}
602602

603-
void FileCommit(FILE *fileout)
603+
void FileCommit(FILE *file)
604604
{
605-
fflush(fileout); // harmless if redundantly called
605+
fflush(file); // harmless if redundantly called
606606
#ifdef WIN32
607-
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout));
607+
HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(file));
608608
FlushFileBuffers(hFile);
609609
#else
610610
#if defined(__linux__) || defined(__NetBSD__)
611-
fdatasync(fileno(fileout));
611+
fdatasync(fileno(file));
612612
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
613-
fcntl(fileno(fileout), F_FULLFSYNC, 0);
613+
fcntl(fileno(file), F_FULLFSYNC, 0);
614614
#else
615-
fsync(fileno(fileout));
615+
fsync(fileno(file));
616616
#endif
617617
#endif
618618
}

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)