[PATCH] dm-verity: fix coverity warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dm-verity: fix coverity warning

Fix a trivial warning issued by coverity.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

---
 drivers/md/dm-verity.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-3.9.8-fast/drivers/md/dm-verity.c
===================================================================
--- linux-3.9.8-fast.orig/drivers/md/dm-verity.c	2013-06-28 00:55:58.000000000 +0200
+++ linux-3.9.8-fast/drivers/md/dm-verity.c	2013-06-28 00:57:20.000000000 +0200
@@ -695,8 +695,8 @@ static int verity_ctr(struct dm_target *
 		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;

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux