diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-05-13 17:27:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:06:37 -0400 |
commit | b4ac3c8d8de387366be11c7320693e0b14429a49 (patch) | |
tree | be2f252221e8d618197b154ac917a84baeaa5150 /drivers | |
parent | 54b6550e430aa8739dceb5ba0fe4325c0208d3a7 (diff) |
V4L/DVB (7924): ivtv/cx18: snprintf fixes
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 2b810bb2a4c7..d9178843e8d2 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -614,7 +614,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
614 | cx18_cards[cx18_cards_active] = cx; | 614 | cx18_cards[cx18_cards_active] = cx; |
615 | cx->dev = dev; | 615 | cx->dev = dev; |
616 | cx->num = cx18_cards_active++; | 616 | cx->num = cx18_cards_active++; |
617 | snprintf(cx->name, sizeof(cx->name) - 1, "cx18-%d", cx->num); | 617 | snprintf(cx->name, sizeof(cx->name), "cx18-%d", cx->num); |
618 | CX18_INFO("Initializing card #%d\n", cx->num); | 618 | CX18_INFO("Initializing card #%d\n", cx->num); |
619 | 619 | ||
620 | spin_unlock(&cx18_cards_lock); | 620 | spin_unlock(&cx18_cards_lock); |
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 797e636771da..bbe92d9dce36 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -1019,7 +1019,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev, | |||
1019 | ivtv_cards[ivtv_cards_active] = itv; | 1019 | ivtv_cards[ivtv_cards_active] = itv; |
1020 | itv->dev = dev; | 1020 | itv->dev = dev; |
1021 | itv->num = ivtv_cards_active++; | 1021 | itv->num = ivtv_cards_active++; |
1022 | snprintf(itv->name, sizeof(itv->name) - 1, "ivtv%d", itv->num); | 1022 | snprintf(itv->name, sizeof(itv->name), "ivtv%d", itv->num); |
1023 | IVTV_INFO("Initializing card #%d\n", itv->num); | 1023 | IVTV_INFO("Initializing card #%d\n", itv->num); |
1024 | 1024 | ||
1025 | spin_unlock(&ivtv_cards_lock); | 1025 | spin_unlock(&ivtv_cards_lock); |