]> git.baikalelectronics.ru Git - kernel.git/commit
mm/zswap.c: switch from strlcpy to strscpy
authorZhiyuan Dai <daizhiyuan@phytium.com.cn>
Wed, 5 May 2021 01:39:57 +0000 (18:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:27 +0000 (11:27 -0700)
commitc904287972e1eb79f6a9c8cf4e902bda32b5491e
tree3b568abc6cba222d773d12e61f8da05f346574a7
parent8c02f23d17bb9a689874b6b10924a0d9f82fc8c2
mm/zswap.c: switch from strlcpy to strscpy

strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value).  strscpy is relatively better as
it also avoids scanning the whole source string.

Link: https://lkml.kernel.org/r/1614227981-20367-1-git-send-email-daizhiyuan@phytium.com.cn
Signed-off-by: Zhiyuan Dai <daizhiyuan@phytium.com.cn>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/zswap.c