summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-ntrig.c
diff options
context:
space:
mode:
authorXiongfeng Wang <xiongfeng.wang@linaro.org>2018-01-09 20:23:32 +0800
committerJiri Kosina <jkosina@suse.cz>2018-02-16 13:36:50 +0100
commit336fd4f5f25157e9e8bd50e898a1bbcd99eaea46 (patch)
tree5d3e78c6dd76eae8c5ed14e9f8716ea56a37ebbc /drivers/hid/hid-ntrig.c
parentb9ec7009298ee0e163339484992252d8dff636dc (diff)
HID: uhid: use strlcpy() instead of strncpy()
gcc-8 reports drivers/hid/uhid.c: In function 'uhid_dev_create2': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation] The compiler require that the input param 'len' of strncpy() should be greater than the length of the src string, so that '\0' is copied as well. We can just use strlcpy() to avoid this warning. Signed-off-by: Xiongfeng Wang <xiongfeng.wang@linaro.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-ntrig.c')
0 files changed, 0 insertions, 0 deletions