[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADDUTFyAAAv641OfGf_U4hVdegyAVyp5rgruF=NSNd+UPkjOzQ@mail.gmail.com>
Date: Tue, 25 Nov 2025 10:35:39 +0200
From: Costa Shulyupin <costa.shul@...hat.com>
To: Wander Lairson Costa <wander@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Tomas Glozar <tglozar@...hat.com>,
Ivan Pravdin <ipravdin.official@...il.com>, Crystal Wood <crwood@...hat.com>,
John Kacur <jkacur@...hat.com>, Tiezhu Yang <yangtiezhu@...ngson.cn>,
"open list:Real-time Linux Analysis (RTLA) tools" <linux-trace-kernel@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:BPF [MISC]:Keyword:(?:b|_)bpf(?:b|_)" <bpf@...r.kernel.org>
Subject: Re: [rtla 04/13] rtla: Replace atoi() with a robust strtoi()
On Mon, 17 Nov 2025 at 20:55, Wander Lairson Costa <wander@...hat.com> 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
Powered by blists - more mailing lists