base: fix warnings reported by LLVM analyzer

The warnings were false positives though.
This commit is contained in:
Norman Feske
2019-01-28 14:37:17 +01:00
parent 6b289a1423
commit bcb24e316c
5 changed files with 29 additions and 17 deletions

View File

@ -97,15 +97,15 @@ class Genode::Capability_space_tpl
bool higher(Tree_managed_data *data)
{
return data->rpc_obj_key().value() > rpc_obj_key().value();
return data->rpc_obj_key().value() > this->rpc_obj_key().value();
}
Tree_managed_data *find_by_key(Rpc_obj_key key)
{
if (key.value() == rpc_obj_key().value()) return this;
if (key.value() == this->rpc_obj_key().value()) return this;
Tree_managed_data *data =
this->child(key.value() > rpc_obj_key().value());
this->child(key.value() > this->rpc_obj_key().value());
return data ? data->find_by_key(key) : nullptr;
}