orangefs: use correct string length
authorXiongfeng Wang <xiongfeng.wang@linaro.org>
Mon, 8 Jan 2018 12:22:33 +0000 (20:22 +0800)
committerMike Marshall <hubcap@omnibond.com>
Tue, 6 Feb 2018 21:38:12 +0000 (16:38 -0500)
commit6bdfb48dae8e1b98735bf9387557298d17510be9
tree4545b9afbade85593da6d259f4225e879419d9b9
parent4d0cac7e752cccb9eb30cd0f22438b9506ed51bc
orangefs: use correct string length

gcc-8 reports

fs/orangefs/dcache.c: In function 'orangefs_d_revalidate':
./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
bound 256 equals destination size [-Wstringop-truncation]

fs/orangefs/namei.c: In function 'orangefs_rename':
./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
bound 256 equals destination size [-Wstringop-truncation]

fs/orangefs/super.c: In function 'orangefs_mount':
./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
bound 256 equals destination size [-Wstringop-truncation]

We need one less byte or call strlcpy() to make it a nul-terminated
string.

Signed-off-by: Xiongfeng Wang <xiongfeng.wang@linaro.org>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/dcache.c
fs/orangefs/namei.c
fs/orangefs/super.c