From 3924a041ba3798c228749de1fc5491fd5411103b Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 17 Oct 2013 10:11:53 +0200 Subject: [PATCH] coverity: sscanf should use "%u" instead of "%i" The "age" variable is unsigned: unsigned age = 0; ... if (argc == 2 && (sscanf(argv[1], "%i", &age) != 1)) --- tools/dmsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 517e8aa64..a0ee23ee5 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -1147,7 +1147,7 @@ static int _udevcomplete_all(CMD_ARGS) unsigned age = 0; time_t t; - if (argc == 2 && (sscanf(argv[1], "%i", &age) != 1)) { + if (argc == 2 && (sscanf(argv[1], "%u", &age) != 1)) { log_error("Failed to read age_in_minutes parameter."); return 0; }