Re: [PATCH 1/2] Doc: deprecated.rst: add strlcat()
From: Jani Nikula
Date: Tue May 12 2026 - 04:58:01 EST
On Sun, 10 May 2026, Manuel Ebner <manuelebner@xxxxxxxxxxx> wrote:
> add strlcat and alternatives
You'd think it's the strlcat() definition that needs a comment above it
saying it's deprecated. I don't think folks really look at
deprecated.rst.
BR,
Jani.
>
> Signed-off-by: Manuel Ebner <manuelebner@xxxxxxxxxxx>
> ---
> Documentation/process/deprecated.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/process/deprecated.rst b/Documentation/process/deprecated.rst
> index fed56864d036..b8a65c19796c 100644
> --- a/Documentation/process/deprecated.rst
> +++ b/Documentation/process/deprecated.rst
> @@ -162,6 +162,12 @@ if a source string is not NUL-terminated. The safe replacement is strscpy(),
> though care must be given to any cases where the return value of strlcpy()
> is used, since strscpy() will return negative errno values when it truncates.
>
> +strlcat()
> +---------
> +strlcat() must re-scan the destination string from the beginning on each
> +call (O(n^2) behavior). Alternatives are seq_buf_puts(), seq_buf_printf(),
> +snprintf() and scnprintf()
> +
> %p format specifier
> -------------------
> Traditionally, using "%p" in format strings would lead to regular address
--
Jani Nikula, Intel