Re: [PATCH] tools/sched_ext: fix strtoul() misuse in scx_hotplug_seq()
From: Tejun Heo
Date: Fri Feb 27 2026 - 13:21:19 EST
On Fri, Feb 27, 2026 at 06:14:39PM +0000, David Carlier wrote:
> + val = strtol(buf, NULL, 10);
> + SCX_BUG_ON(val < 0, "invalid num hotplug events: %ld", val);
This isn't a proper way to detect conversion errors either, right? Wouldn't
it be better to keep strtoul() and test whether endptr reaches \0?
Thanks.
--
tejun