diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-13 20:27:15 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-13 20:27:15 +0200 |
commit | 611c0c57b9ee26a27b8a4d23a1a6d430ebe83fc7 (patch) | |
tree | 6a004609bdb3f4057488052128dc80b3c0d8f8dc | |
parent | e8af083c78cec1b0711b71093bf7a2837e7113f9 (diff) | |
download | mediapointer-dvb-s2-611c0c57b9ee26a27b8a4d23a1a6d430ebe83fc7.tar.gz mediapointer-dvb-s2-611c0c57b9ee26a27b8a4d23a1a6d430ebe83fc7.tar.bz2 |
ivtv/cx18: snprintf fixes
From: Jean Delvare <khali@linux-fr.org>
snprinf() takes the trailing \0 into account in its length calculations,
so there is no need to subtract 1 to the buffer size.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | linux/drivers/media/video/cx18/cx18-driver.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-driver.c b/linux/drivers/media/video/cx18/cx18-driver.c index 008745af2..b8b3a9393 100644 --- a/linux/drivers/media/video/cx18/cx18-driver.c +++ b/linux/drivers/media/video/cx18/cx18-driver.c @@ -614,7 +614,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, cx18_cards[cx18_cards_active] = cx; cx->dev = dev; cx->num = cx18_cards_active++; - snprintf(cx->name, sizeof(cx->name) - 1, "cx18-%d", cx->num); + snprintf(cx->name, sizeof(cx->name), "cx18-%d", cx->num); CX18_INFO("Initializing card #%d\n", cx->num); spin_unlock(&cx18_cards_lock); diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index b6f1fc7f4..8c6e90350 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -1023,7 +1023,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ivtv_cards[ivtv_cards_active] = itv; itv->dev = dev; itv->num = ivtv_cards_active++; - snprintf(itv->name, sizeof(itv->name) - 1, "ivtv%d", itv->num); + snprintf(itv->name, sizeof(itv->name), "ivtv%d", itv->num); IVTV_INFO("Initializing card #%d\n", itv->num); spin_unlock(&ivtv_cards_lock); |