mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-03 04:26:45 +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)
|
bool read)
|
||||||
{
|
{
|
||||||
/* sanity check block number */
|
/* sanity check block number */
|
||||||
if ((block_number + block_count > _file_sz / _blk_sz)
|
if (block_number + block_count > _file_sz / _blk_sz) {
|
||||||
|| block_number < 0) {
|
|
||||||
PWRN("requested blocks %lld-%lld out of range!",
|
PWRN("requested blocks %lld-%lld out of range!",
|
||||||
block_number, block_number + block_count);
|
block_number, block_number + block_count);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user