Skip to content
  • Xiongfeng Wang's avatar
    orangefs: use correct string length · 6bdfb48d
    Xiongfeng Wang authored
    
    
    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: default avatarXiongfeng Wang <xiongfeng.wang@linaro.org>
    Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
    6bdfb48d