Commit cacddeab authored by Colin Ian King's avatar Colin Ian King Committed by Mike Snitzer

dm dust: remove redundant unsigned comparison to less than zero

Variable block is an unsigned long long hence the less than zero
comparison is always false, hence it is redundant and can be removed.

Addresses-Coverity: ("Unsigned compared against 0")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarBryan Gurney <bgurney@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 940bc471
......@@ -411,7 +411,7 @@ static int dust_message(struct dm_target *ti, unsigned int argc, char **argv,
block = tmp;
sector_div(size, dd->sect_per_block);
if (block > size || block < 0) {
if (block > size) {
DMERR("selected block value out of range");
return result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment