Whamcloud - gitweb
LU-12861 libcfs: provide an scnprintf and start using it
snprintf() returns the number of chars that would be needed to hold
the complete result, which may be larger that the buffer size.
scnprintf differs in it's return value is number of chars actually
written (not including the terminating null).
Correct the few patterns where the return from snprintf() is used and
expected not to exceed the passed buffer size.
Test-Parameters: trivial
Cray-bug-id: LUS-7999
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: Ie42458be16e8c0ba1cb6d688fd418683f18de21e
Reviewed-on: https://review.whamcloud.com/36453
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 files changed: