PVS 109: useless check
error was already checked one line above.
This commit is contained in:
parent
2f8639483a
commit
3ec6800839
@ -310,9 +310,9 @@ ResourceFile::ReadResource(ResourceItem& resource, bool force)
|
||||
status_t error = InitCheck();
|
||||
size_t size = resource.DataSize();
|
||||
if (error == B_OK && (force || !resource.IsLoaded())) {
|
||||
if (error == B_OK)
|
||||
error = resource.SetSize(size);
|
||||
void* data = NULL;
|
||||
error = resource.SetSize(size);
|
||||
|
||||
if (error == B_OK) {
|
||||
data = resource.Data();
|
||||
ssize_t bytesRead = fFile.ReadAt(resource.Offset(), data, size);
|
||||
|
Loading…
Reference in New Issue
Block a user