PVS 109: useless check

error was already checked one line above.
This commit is contained in:
Adrien Destugues 2015-07-26 15:31:43 +02:00
parent 2f8639483a
commit 3ec6800839

View File

@ -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);