mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-25 13:49:28 +03:00
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))
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user