Re: [rtla 04/13] rtla: Replace atoi() with a robust strtoi()

From: Costa Shulyupin
Date: Tue Nov 25 2025 - 03:38:02 EST


On Mon, 17 Nov 2025 at 20:55, Wander Lairson Costa <wander@xxxxxxxxxx> wrote:
> To address this, introduce a new strtoi() helper function that safely
> converts a string to an integer. This function validates the input and
> checks for overflows, returning a boolean to indicate success or failure.

Why not use sscanf() for this purpose instead of adding a new utility function?

Also, using a boolean to return success or failure does not conform to
POSIX standards and is confusing in Linux/POSIX code.

Costa