Re: [PATCH v2] drm/i915: refactor deprecated strncpy

2023-09-20 Thread Rodrigo Vivi
On Tue, Sep 19, 2023 at 04:45:31AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it > guarantees

[PATCH v2] drm/i915: refactor deprecated strncpy

2023-09-18 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding.