mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Inverse the error check logic for the MappedFile::map() call. It returns
a null pointer when there is an error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29827 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8509c95b8
commit
a5ec45d3c1
@ -209,7 +209,7 @@ Archive::writeMember(
|
||||
mFile = new sys::MappedFile();
|
||||
if (mFile->open(member.getPath(), sys::MappedFile::READ_ACCESS, &ErrMsg))
|
||||
throw ErrMsg;
|
||||
if (data = (const char*) mFile->map(&ErrMsg))
|
||||
if (!(data = (const char*) mFile->map(&ErrMsg)))
|
||||
throw ErrMsg;
|
||||
fSize = mFile->size();
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ Archive::writeMember(
|
||||
mFile = new sys::MappedFile();
|
||||
if (mFile->open(member.getPath(), sys::MappedFile::READ_ACCESS, &ErrMsg))
|
||||
throw ErrMsg;
|
||||
if (data = (const char*) mFile->map(&ErrMsg))
|
||||
if (!(data = (const char*) mFile->map(&ErrMsg)))
|
||||
throw ErrMsg;
|
||||
fSize = mFile->size();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user