Skip to content
Commit 1471d85f authored by Thorsten Winkler's avatar Thorsten Winkler Committed by Paolo Abeni
Browse files

s390/ctcm: Convert sprintf/snprintf 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.

Note that ctcm_print_statistics() writes the data into the kernel log
and is therefore not suitable for sysfs_emit(). Observable behavior is
not changed, as there may be dependencies.

Reviewed-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: default avatarThorsten Winkler <twinkler@linux.ibm.com>
Signed-off-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent d585e4b7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment