• Xiongfeng Wang's avatar
    ipmi: use correct string length · 1b4254ce
    Xiongfeng Wang authored
    gcc-8 reports
    
    drivers/char/ipmi/ipmi_msghandler.c: In function
    'panic_op_write_handler':
    ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
    bound 16 equals destination size [-Wstringop-truncation]
    
    drivers/char/ipmi/ipmi_watchdog.c: In function 'set_param_str':
    ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
    bound 16 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 avatarCorey Minyard <cminyard@mvista.com>
    1b4254ce
ipmi_msghandler.c 132 KB