aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2018-09-10 08:19:16 -0400
committerMauro Carvalho Chehab2019-03-29 10:26:13 -0400
commit85709cbf152465c77a9c2de48a6f4ef23c8c3d83 (patch)
tree4dc492b6da48d0d1f9ede150c0c2386f4efb6438 /drivers/media/radio
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/media/radio')
-rw-r--r--drivers/media/radio/si4713/si4713.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c
index f4a53f1e856e..a8584371a32d 100644
--- a/drivers/media/radio/si4713/si4713.c
+++ b/drivers/media/radio/si4713/si4713.c
@@ -1272,7 +1272,7 @@ static int si4713_g_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
if (vm->index > 0)
return -EINVAL;
- strncpy(vm->name, "FM Modulator", 32);
+ strscpy(vm->name, "FM Modulator", sizeof(vm->name));
vm->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_LOW |
V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_CONTROLS;