Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-13 Thread Corey Minyard
On Tue, Sep 12, 2023 at 05:55:02PM -0700, Justin Stitt wrote: > On Tue, Sep 12, 2023 at 5:19 PM Corey Minyard wrote: > > > > On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > > > In this case, strn

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 5:55 PM Justin Stitt wrote: > > On Tue, Sep 12, 2023 at 5:19 PM Corey Minyard wrote: > > > > On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > > > In this case, strncpy is

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 5:19 PM Corey Minyard wrote: > > On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > In this case, strncpy is being used specifically for its NUL-padding > > behavior (and has b

Re: [PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Corey Minyard
On Tue, Sep 12, 2023 at 11:43:05PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > In this case, strncpy is being used specifically for its NUL-padding > behavior (and has been commented as such). We can use a more robust and > less ambig

[PATCH] ipmi: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. In this case, strncpy is being used specifically for its NUL-padding behavior (and has been commented as such). We can use a more robust and less ambiguous interface in `strscpy_pad` which makes the code more readable and e