mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-14 16:58:10 +02:00
tools: use xatou in the demo client/server
Assisted-by: Claude:claude-opus-4-6 Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/388>
This commit is contained in:
parent
dc5bd1396f
commit
4ec936f016
2 changed files with 12 additions and 3 deletions
|
|
@ -258,10 +258,16 @@ main(int argc, char **argv)
|
|||
receiver = true;
|
||||
break;
|
||||
case OPT_INTERVAL:
|
||||
interval = atoi(optarg);
|
||||
if (!xatou(optarg, &interval)) {
|
||||
fprintf(stderr, "Invalid interval: %s\n", optarg);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
break;
|
||||
case OPT_ITERATIONS:
|
||||
iterations = atoi(optarg);
|
||||
if (!xatou(optarg, &iterations)) {
|
||||
fprintf(stderr, "Invalid iterations: %s\n", optarg);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
usage(stderr, argv[0]);
|
||||
|
|
|
|||
|
|
@ -698,7 +698,10 @@ main(int argc, char **argv)
|
|||
verbose = true;
|
||||
break;
|
||||
case OPT_INTERVAL:
|
||||
interval = atoi(optarg);
|
||||
if (!xatou(optarg, &interval)) {
|
||||
fprintf(stderr, "Invalid interval: %s\n", optarg);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
usage(stderr, argv[0]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue