mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
A value is only assigned to errno if NumRead equals -1, so do
not reason based on errno if NumRead has a different value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1709dd73d6
commit
7127b13342
@ -229,7 +229,7 @@ MemoryBuffer *MemoryBuffer::getFile(const char *Filename, std::string *ErrStr,
|
||||
if (NumRead > 0) {
|
||||
BytesLeft -= NumRead;
|
||||
BufPtr += NumRead;
|
||||
} else if (errno == EINTR) {
|
||||
} else if (NumRead == -1 && errno == EINTR) {
|
||||
// try again
|
||||
} else {
|
||||
// error reading.
|
||||
|
Loading…
Reference in New Issue
Block a user