[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADUfDZqcniNgTUC0v0R450LrL=oMW+-6fh8cgaOXe1K=V1t3+g@mail.gmail.com>
Date: Tue, 15 Apr 2025 07:39:22 -0700
From: Caleb Sander Mateos <csander@...estorage.com>
To: Kevin Paul Reddy Janagari <kevinpaul468@...il.com>
Cc: hch@....de, sagi@...mberg.me, kch@...dia.com,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme: Removing deprecated strncpy()
On Mon, Apr 14, 2025 at 5:37 PM Kevin Paul Reddy Janagari
<kevinpaul468@...il.com> wrote:
>
> This patch suggests the replacement of strncpy with strscpy
> as per Documentation/process/deprecated.
> The strncpy() fails to guarantee NULL termination,
> The function adds zero pads which isn't really convenient for short strings
> as it may cause performance issues.
>
> strscpy() is a preferred replacement because
> it overcomes the limitations of strncpy mentioned above.
This patch was posted to the mailing list earlier:
https://lists.infradead.org/pipermail/linux-nvme/2025-April/055004.html
Best,
Caleb
Powered by blists - more mailing lists