[llvm-commits] [llvm] r104852 - /llvm/trunk/lib/System/Unix/Path.inc
Dan Gohman
gohman at apple.com
Thu May 27 10:14:10 PDT 2010
Author: djg
Date: Thu May 27 12:14:10 2010
New Revision: 104852
URL: http://llvm.org/viewvc/llvm-project?rev=104852&view=rev
Log:
Don't bother clearing the Magic string when the magic number
can't be read, since it isn't cleared on other error paths.
Modified:
llvm/trunk/lib/System/Unix/Path.inc
Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=104852&r1=104851&r2=104852&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Thu May 27 12:14:10 2010
@@ -421,10 +421,8 @@
return false;
ssize_t bytes_read = ::read(fd, Buf, len);
::close(fd);
- if (ssize_t(len) != bytes_read) {
- Magic.clear();
+ if (ssize_t(len) != bytes_read)
return false;
- }
Magic.assign(Buf, len);
return true;
}
More information about the llvm-commits
mailing list