dm verity: remove pointless comparison
Remove num < 0 test in verity_ctr because num is unsigned. (Found by Coverity.) Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
parent
220cd058d9
commit
5d8be84397
@ -695,8 +695,8 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if (sscanf(argv[0], "%d%c", &num, &dummy) != 1 ||
|
||||
num < 0 || num > 1) {
|
||||
if (sscanf(argv[0], "%u%c", &num, &dummy) != 1 ||
|
||||
num > 1) {
|
||||
ti->error = "Invalid version";
|
||||
r = -EINVAL;
|
||||
goto bad;
|
||||
|
Loading…
Reference in New Issue
Block a user