mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
docs: stop suggesting strlcpy
Since strlcpy is deprecated, the documentation shouldn't suggest using it. This patch fixes the examples to use strscpy instead. It also uses sizeof instead of underlying constants as far as possible, to simplify future changes to the corresponding data structures. Signed-off-by: Stephen Kitt <[email protected]> Acked-by: Kees Cook <[email protected]> Acked-by: Federico Vaga <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
This commit is contained in:
parent
4ae5b8f214
commit
220ee02a0b
5 changed files with 12 additions and 12 deletions
|
|
@ -194,9 +194,9 @@ with HID core:
|
|||
goto err_<...>;
|
||||
}
|
||||
|
||||
strlcpy(hid->name, <device-name-src>, 127);
|
||||
strlcpy(hid->phys, <device-phys-src>, 63);
|
||||
strlcpy(hid->uniq, <device-uniq-src>, 63);
|
||||
strscpy(hid->name, <device-name-src>, sizeof(hid->name));
|
||||
strscpy(hid->phys, <device-phys-src>, sizeof(hid->phys));
|
||||
strscpy(hid->uniq, <device-uniq-src>, sizeof(hid->uniq));
|
||||
|
||||
hid->ll_driver = &custom_ll_driver;
|
||||
hid->bus = <device-bus>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue