ext2: fix logic error.

* Thanks to Ingo and Jérôme for review.
* The Remove can't fail after a succesful Lookup so don't check for that
* Return B_OK on success
This commit is contained in:
Adrien Destugues
2015-01-13 22:53:37 +01:00
parent 89678b6b5a
commit e95068dfa8
@@ -92,12 +92,11 @@ HashRevokeManager::Remove(uint32 block)
if (element == NULL) if (element == NULL)
return B_ERROR; // TODO: Perhaps we should just ignore? return B_ERROR; // TODO: Perhaps we should just ignore?
bool retValue = fHash->Remove(element); fHash->Remove(element);
// Can't fail as we just did a sucessful Lookup()
if (retValue)
delete element; delete element;
return B_OK;
return B_ERROR;
} }