Commit bcab64e8 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: imx: fix compiler warning

drivers/staging/media/imx/imx-media-capture.c: In function 'vidioc_querycap':
drivers/staging/media/imx/imx-media-capture.c:76:2: warning: 'strncpy' output truncated copying 15 bytes from a string of length 17 [-Wstringop-truncation]
  strncpy(cap->driver, "imx-media-capture", sizeof(cap->driver) - 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSteve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent b37705d3
......@@ -73,8 +73,8 @@ static int vidioc_querycap(struct file *file, void *fh,
{
struct capture_priv *priv = video_drvdata(file);
strncpy(cap->driver, "imx-media-capture", sizeof(cap->driver) - 1);
strncpy(cap->card, "imx-media-capture", sizeof(cap->card) - 1);
strlcpy(cap->driver, "imx-media-capture", sizeof(cap->driver));
strlcpy(cap->card, "imx-media-capture", sizeof(cap->card));
snprintf(cap->bus_info, sizeof(cap->bus_info),
"platform:%s", priv->src_sd->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment