[PATCH] D85480: [NFC] Use value initializer for OVERLAPPED

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 11:18:54 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2b5502c3503e: [NFC] Use value initializer for OVERLAPPED (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85480/new/

https://reviews.llvm.org/D85480

Files:
  llvm/lib/Support/Windows/Path.inc


Index: llvm/lib/Support/Windows/Path.inc
===================================================================
--- llvm/lib/Support/Windows/Path.inc
+++ llvm/lib/Support/Windows/Path.inc
@@ -1262,7 +1262,7 @@
 
 std::error_code tryLockFile(int FD, std::chrono::milliseconds Timeout) {
   DWORD Flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY;
-  OVERLAPPED OV = {0};
+  OVERLAPPED OV = {};
   file_t File = convertFDToNativeFile(FD);
   auto Start = std::chrono::steady_clock::now();
   auto End = Start + Timeout;
@@ -1281,7 +1281,7 @@
 
 std::error_code lockFile(int FD) {
   DWORD Flags = LOCKFILE_EXCLUSIVE_LOCK;
-  OVERLAPPED OV = {0};
+  OVERLAPPED OV = {};
   file_t File = convertFDToNativeFile(FD);
   if (::LockFileEx(File, Flags, 0, MAXDWORD, MAXDWORD, &OV))
     return std::error_code();
@@ -1290,7 +1290,7 @@
 }
 
 std::error_code unlockFile(int FD) {
-  OVERLAPPED OV = {0};
+  OVERLAPPED OV = {};
   file_t File = convertFDToNativeFile(FD);
   if (::UnlockFileEx(File, 0, MAXDWORD, MAXDWORD, &OV))
     return std::error_code();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85480.283961.patch
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200807/15213198/attachment.bin>


More information about the llvm-commits mailing list