ca/tools: fix type errors in option parsing
(found by sonar/cppcheck)
This commit is contained in:
@@ -157,7 +157,7 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
break;
|
||||
case 's': /* ca_client_status interest level */
|
||||
if (sscanf(optarg,"%du", &statLevel) != 1)
|
||||
if (sscanf(optarg,"%u", &statLevel) != 1)
|
||||
{
|
||||
fprintf(stderr, "'%s' is not a valid interest level "
|
||||
"- ignored. ('cainfo -h' for help.)\n", optarg);
|
||||
|
||||
@@ -258,7 +258,7 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
break;
|
||||
case '#': /* Array count */
|
||||
if (sscanf(optarg,"%ld", &reqElems) != 1)
|
||||
if (sscanf(optarg,"%lu", &reqElems) != 1)
|
||||
{
|
||||
fprintf(stderr, "'%s' is not a valid array element count "
|
||||
"- ignored. ('camonitor -h' for help.)\n", optarg);
|
||||
|
||||
Reference in New Issue
Block a user