mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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:
parent
9b13cb8687
commit
3924a041ba
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user