s390/lcs: Convert sprintf to scnprintf
authorThorsten Winkler <twinkler@linux.ibm.com>
Wed, 21 Jun 2023 13:49:19 +0000 (15:49 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Fri, 23 Jun 2023 09:55:54 +0000 (11:55 +0200)
commit1a079f3e95295c3534c89f008e5e961a386e25e9
treecc220aaf4e8c5abc1ab420bf36650745bd34b7ef
parentd3f0c7fa09932d34bbf5548a156316927a099f25
s390/lcs: Convert sprintf to scnprintf

This LWN article explains the why scnprintf is preferred over snprintf
in general
https://lwn.net/Articles/69419/
Ie. snprintf() returns what *would* be the resulting length, while
scnprintf() returns the actual length.

Reported-by: Jules Irenge <jbi.octave@gmail.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Thorsten Winkler <twinkler@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/s390/net/lcs.h