projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
220cd05
)
dm verity: remove pointless comparison
author
Mikulas Patocka
<mpatocka@redhat.com>
Wed, 10 Jul 2013 22:41:17 +0000
(23:41 +0100)
committer
Alasdair G Kergon
<agk@redhat.com>
Wed, 10 Jul 2013 22:41:17 +0000
(23:41 +0100)
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>
drivers/md/dm-verity.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-verity.c
b/drivers/md/dm-verity.c
index 0d2e812d424bff13aeb2ae7905d6ff026ffec581..9804da16a4764ac07dbdf8c63a5de531455a3639 100644
(file)
--- a/
drivers/md/dm-verity.c
+++ b/
drivers/md/dm-verity.c
@@
-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;