]> git.baikalelectronics.ru Git - kernel.git/commit
s390/zcrypt: replace snprintf/sprintf with scnprintf
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 12 Mar 2020 10:19:55 +0000 (11:19 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 23 Mar 2020 12:41:54 +0000 (13:41 +0100)
commitd49b019dbfef507f0722691191da3afccb6c5553
treecad7b3f657806f5c4fe6b95d129ee55ce56560f1
parent86e790af82b5dada9a1b7a763c0ea48ae9871081
s390/zcrypt: replace snprintf/sprintf with scnprintf

snprintf() may not always return the correct size of used bytes but
instead the length the resulting string would be if it would fit into
the buffer. So scnprintf() is the function to use when the real length
of the resulting string is needed.

Replace all occurrences of snprintf() with scnprintf() where the return
code is further processed. Also find and fix some occurrences where
sprintf() was used.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_card.c
drivers/s390/crypto/ap_queue.c
drivers/s390/crypto/zcrypt_card.c
drivers/s390/crypto/zcrypt_cex4.c
drivers/s390/crypto/zcrypt_queue.c