Re: [PATCH] bcachefs: replace deprecated strncpy with strscpy
From: Kent Overstreet
Date: Wed Nov 13 2024 - 21:21:33 EST
On Tue, Nov 12, 2024 at 11:42:48PM -0800, Daniel Yang wrote:
> The function strncpy is deprecated due to not guaranteeing the
> destination buffer will be NULL-terminated. The recommended replacement
> is to use strscpy().
strncpy is correct here, we don't need the output to be nul terminated