We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5460045 commit 2da2202Copy full SHA for 2da2202
src/util/block.c
@@ -19,9 +19,10 @@ static error_t
19
partition_erase(struct block_iface *bi, size_t block, size_t count)
20
{
21
partition_t *p = (partition_t *)bi;
22
- block += p->offset;
23
- if (block + count > p->iface.num_blocks)
+ if (block + count > p->iface.num_blocks) {
24
return ERR_NOSPC;
+ }
25
+ block += p->offset;
26
return p->parent->erase(p->parent, block, count);
27
}
28
0 commit comments