]> git.baikalelectronics.ru Git - kernel.git/commit
s390/crypto: use scnprintf() instead of snprintf()
authorChen Zhou <chenzhou10@huawei.com>
Sat, 9 May 2020 08:56:06 +0000 (16:56 +0800)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 16 Jun 2020 11:44:05 +0000 (13:44 +0200)
commit79a56af8a25e8f4df1df3be782e111e59714927f
treee768e73b15286a9c829532cc668c723e651ea214
parentb53a6afd0a77c7cef57797290ac45589e9480b21
s390/crypto: use scnprintf() instead of snprintf()

snprintf() returns the number of bytes that would be written,
which may be greater than the the actual length to be written.

show() methods should return the number of bytes printed into the
buffer. This is the return value of scnprintf().

Link: https://lkml.kernel.org/r/20200509085608.41061-2-chenzhou10@huawei.com
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/crypto/prng.c