aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-02-23 15:20:06 (GMT)
committerKamil Debski <k.debski@samsung.com>2015-03-18 14:14:36 (GMT)
commitfa9eeb43992f56151d0e186b3069d0d857f17625 (patch)
tree0328f3a2a1d0a6889647d57dd140c3273a7a1e20
parent1dbc02568231f37d4feca1bfba1ec32ac586fc5d (diff)
coda: use strlcpy instead of snprintfv4.0-fixes-2
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>
-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 37bbd57..04130ea 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1908,8 +1908,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,

Privacy Policy