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:
Josef Söntgen 2014-04-17 13:56:09 +02:00 committed by Christian Helmuth
parent c9412d37b9
commit edfd90a1bc

View File

@ -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;