summaryrefslogtreecommitdiff
path: root/drivers/staging/media/bcm2048
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-10 08:19:16 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-29 10:26:13 -0400
commit85709cbf152465c77a9c2de48a6f4ef23c8c3d83 (patch)
tree4dc492b6da48d0d1f9ede150c0c2386f4efb6438 /drivers/staging/media/bcm2048
parent060162c1af5cd807384247cc95a0d5cb016e316a (diff)
media: replace strncpy() by strscpy()
The strncpy() function is being deprecated upstream. Replace it by the safer strscpy(). While here, replace a few occurences of strlcpy() that were recently added to also use strscpy(). Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media/bcm2048')
-rw-r--r--drivers/staging/media/bcm2048/radio-bcm2048.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index d9b02ff66259..09903ffb13ba 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2404,7 +2404,7 @@ static int bcm2048_vidioc_g_audio(struct file *file, void *priv,
if (audio->index > 1)
return -EINVAL;
- strncpy(audio->name, "Radio", 32);
+ strscpy(audio->name, "Radio", sizeof(audio->name));
audio->capability = V4L2_AUDCAP_STEREO;
return 0;
@@ -2432,7 +2432,7 @@ static int bcm2048_vidioc_g_tuner(struct file *file, void *priv,
if (tuner->index > 0)
return -EINVAL;
- strncpy(tuner->name, "FM Receiver", 32);
+ strscpy(tuner->name, "FM Receiver", sizeof(tuner->name));
tuner->type = V4L2_TUNER_RADIO;
tuner->rangelow =
dev_to_v4l2(bcm2048_get_region_bottom_frequency(bdev));