Skip to content

Commit

Permalink
PVS 109: useless check
Browse files Browse the repository at this point in the history
error was already checked one line above.
  • Loading branch information
pulkomandy committed Jul 26, 2015
1 parent 2f86394 commit 3ec6800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kits/storage/ResourceFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3ec6800

Please sign in to comment.