Whamcloud - gitweb
LU-10728 utils: fix str length in error string 68/40268/3
authorCyril Bordage <cbordage@whamcloud.com>
Fri, 16 Oct 2020 13:39:06 +0000 (15:39 +0200)
committerOleg Drokin <green@whamcloud.com>
Tue, 3 Nov 2020 03:40:32 +0000 (03:40 +0000)
commit4b2a760fc4747c748ce460289854b76ed17b9ca2
tree9aa93de6d3cfa96cd285bbac013708dfedcf08fd
parentfd7b4960d7dbd4164d1e2a9ac8b8009bbcd5fa08
LU-10728 utils: fix str length in error string

sizeof on pointers was used to get the length of the string. Use
instead string length from function inputs. Also remove useless uses
of snprintf and terminating null bytes.

Test-Parameters: @lnet
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I7053f39828ababd5782b360ef5c27c607ddb740d
Reviewed-on: https://review.whamcloud.com/40268
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lnetconfig/liblnetconfig.c