Re: [PATCH] power: supply: surface-charger: replace deprecated strncpy with strscpy

2023-10-21 Thread Maximilian Luz
On 10/20/23 21:46, Justin Stitt wrote: strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect ac->name to be NUL-terminated based on its usage with format strings: surface_charger.c: 190:

Re: [PATCH] power: supply: surface-charger: replace deprecated strncpy with strscpy

2023-10-20 Thread Sebastian Reichel
On Fri, 20 Oct 2023 19:46:11 +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect ac->name to be NUL-terminated based on its usage with format > stri

[PATCH] power: supply: surface-charger: replace deprecated strncpy with strscpy

2023-10-20 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect ac->name to be NUL-terminated based on its usage with format strings: surface_charger.c: 190: ac->psy_desc.name = ac->name; ... powe