projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
130de9c
)
Don't bother clearing the Magic string when the magic number
author
Dan Gohman
<gohman@apple.com>
Thu, 27 May 2010 17:14:10 +0000
(17:14 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 27 May 2010 17:14:10 +0000
(17:14 +0000)
can't be read, since it isn't cleared on other error paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104852
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Unix/Path.inc
patch
|
blob
|
history
diff --git
a/lib/System/Unix/Path.inc
b/lib/System/Unix/Path.inc
index 74596dc6ab066eb7ea3af00c9d43950626b80078..185f7fd66bf39443e5b6f153d5fe729bc7944d2e 100644
(file)
--- a/
lib/System/Unix/Path.inc
+++ b/
lib/System/Unix/Path.inc
@@
-421,10
+421,8
@@
bool Path::getMagicNumber(std::string &Magic, unsigned len) const {
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;
}