tools/ptraccel-debug: replace atoi() with safe_atoi()

It's a niche development/debugging tool, argument parsing issues aren't
really something we need to care about but hey, this change is easy.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1467>
This commit is contained in:
Peter Hutterer 2026-04-16 10:29:56 +10:00 committed by Marge Bot
parent 20b52ffafc
commit f899da7552

View file

@ -297,8 +297,7 @@ main(int argc, char **argv)
}
break;
case OPT_NEVENTS:
nevents = atoi(optarg);
if (nevents == 0) {
if (!safe_atoi(optarg, &nevents) || nevents <= 0) {
usage();
return 1;
}