diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 15:19:16 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-03-29 17:26:13 +0300 |
commit | 85709cbf152465c77a9c2de48a6f4ef23c8c3d83 (patch) | |
tree | 4dc492b6da48d0d1f9ede150c0c2386f4efb6438 /drivers/media/platform/vim2m.c | |
parent | 060162c1af5cd807384247cc95a0d5cb016e316a (diff) | |
download | linux-85709cbf152465c77a9c2de48a6f4ef23c8c3d83.tar.xz |
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/platform/vim2m.c')
-rw-r--r-- | drivers/media/platform/vim2m.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index d8763a8a7be6..243c82b5d537 100644 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c @@ -659,8 +659,8 @@ static void device_work(struct work_struct *w) static int vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap) { - strncpy(cap->driver, MEM2MEM_NAME, sizeof(cap->driver) - 1); - strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1); + strscpy(cap->driver, MEM2MEM_NAME, sizeof(cap->driver)); + strscpy(cap->card, MEM2MEM_NAME, sizeof(cap->card)); snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", MEM2MEM_NAME); return 0; |