[llvm-commits] [llvm] r127140 - /llvm/trunk/lib/Support/Windows/PathV2.inc

NAKAMURA Takumi geek4civic at gmail.com
Sun Mar 6 16:12:53 PST 2011


Author: chapuni
Date: Sun Mar  6 18:12:53 2011
New Revision: 127140

URL: http://llvm.org/viewvc/llvm-project?rev=127140&view=rev
Log:
Windows/PathV2.inc: Eliminate redundant condition. DWORD is unsigned.

Modified:
    llvm/trunk/lib/Support/Windows/PathV2.inc

Modified: llvm/trunk/lib/Support/Windows/PathV2.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/PathV2.inc?rev=127140&r1=127139&r2=127140&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/PathV2.inc (original)
+++ llvm/trunk/lib/Support/Windows/PathV2.inc Sun Mar  6 18:12:53 2011
@@ -649,7 +649,7 @@
   ::CloseHandle(file);
   if (!read_success || (bytes_read != len)) {
     // Set result size to the number of bytes read if it's valid.
-    if (bytes_read >= 0 && bytes_read <= len)
+    if (bytes_read <= len)
       result.set_size(bytes_read);
     // ERROR_HANDLE_EOF is mapped to errc::value_too_large.
     return ec;





More information about the llvm-commits mailing list