From 78e86ba01f4ea9f0583eb7efa94ee8a703d73485 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Sun, 15 Jan 2023 15:59:41 +0200 Subject: [PATCH] Update os-inl.h --- include/spdlog/details/os-inl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index 42acf3fe..19d4bdc5 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -602,14 +602,14 @@ std::string SPDLOG_INLINE getenv(const char *field) #endif } -// Do fsync by FILE descriptor +// Do fsync by FILE handlerpointer // Return true on success -SPDLOG_INLINE bool fsync(FILE *fd) +SPDLOG_INLINE bool fsync(FILE *fp) { #ifdef _WIN32 - return FlushFileBuffers(reinterpret_cast(_get_osfhandle(_fileno(fd)))) != 0; + return FlushFileBuffers(reinterpret_cast(_get_osfhandle(_fileno(fp)))) != 0; #else - return ::fsync(fileno(fd)) == 0; + return ::fsync(fileno(fp)) == 0; #endif }