mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 06:57:51 +00:00
ram_blk: remove superfluous block_number check
block_number is Block::sector_t (uint64_t), which never can by less than 0. Fixes #1142.
This commit is contained in:
parent
c9412d37b9
commit
edfd90a1bc
@ -42,8 +42,7 @@ class Ram_blk : public Block::Driver
|
||||
bool read)
|
||||
{
|
||||
/* sanity check block number */
|
||||
if ((block_number + block_count > _file_sz / _blk_sz)
|
||||
|| block_number < 0) {
|
||||
if (block_number + block_count > _file_sz / _blk_sz) {
|
||||
PWRN("requested blocks %lld-%lld out of range!",
|
||||
block_number, block_number + block_count);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user