Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf249daf authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 2b768468
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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,