summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-03-24 14:30:50 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-10 10:05:50 -0300
commitbf249daf079492d60306ad1c5c78d53255ff15a3 (patch)
treeb4e74297fa1293f30b2094c2be8e4fd4f86817fb /drivers/media
parent2b7684683d4b6e41717b9d1354d4080fdee970fc (diff)
[media] coda: use strlcpy instead of snprintf
There is no need to take the detour through a "%s" format string to create a copy of a string. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/coda/coda-common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 2906dd225143..443886535230 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1915,8 +1915,7 @@ static int coda_register_device(struct coda_dev *dev, int i)
if (i >= dev->devtype->num_vdevs)
return -EINVAL;
- snprintf(vfd->name, sizeof(vfd->name), "%s",
- dev->devtype->vdevs[i]->name);
+ strlcpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));
vfd->fops = &coda_fops;
vfd->ioctl_ops = &coda_ioctl_ops;
vfd->release = video_device_release_empty,