diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-02-23 16:20:06 +0100 |
---|---|---|
committer | Kamil Debski <k.debski@samsung.com> | 2015-03-18 15:14:36 +0100 |
commit | fa9eeb43992f56151d0e186b3069d0d857f17625 (patch) | |
tree | 0328f3a2a1d0a6889647d57dd140c3273a7a1e20 | |
parent | 1dbc02568231f37d4feca1bfba1ec32ac586fc5d (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.c | 3 |
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 37bbd57b5a91..04130eaf66f6 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, |