diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-05-14 15:57:03 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-25 22:31:23 +0300 |
commit | b37705d333c8cf8969ce7ffeb345347a5e7a895f (patch) | |
tree | a25a7f6e2c46bb855cf1a37a632abf35d2d08d84 /drivers/media/usb/hdpvr | |
parent | fd1857240df3a57eacc48cfe179d0406951d4f78 (diff) | |
download | linux-b37705d333c8cf8969ce7ffeb345347a5e7a895f.tar.xz |
media: hdpvr: fix compiler warning
In function 'strncpy',
inlined from 'vidioc_g_audio' at media-git/drivers/media/usb/hdpvr/hdpvr-video.c:876:2:
media-git/include/linux/string.h:246:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
return __builtin_strncpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/hdpvr')
-rw-r--r-- | drivers/media/usb/hdpvr/hdpvr-video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c index 77c3d331ff31..1b89c77bad66 100644 --- a/drivers/media/usb/hdpvr/hdpvr-video.c +++ b/drivers/media/usb/hdpvr/hdpvr-video.c @@ -873,7 +873,7 @@ static int vidioc_g_audio(struct file *file, void *private_data, audio->index = dev->options.audio_input; audio->capability = V4L2_AUDCAP_STEREO; - strncpy(audio->name, audio_iname[audio->index], sizeof(audio->name)); + strlcpy(audio->name, audio_iname[audio->index], sizeof(audio->name)); audio->name[sizeof(audio->name) - 1] = '\0'; return 0; } |