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 <[EMAIL PROTECTED]>
---
drivers/media/video/cx18/cx18-driver.c | 2 +-
drivers/media/video/ivtv/ivtv-driver.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.26-rc2.orig/drivers/media/video/cx18/cx18-driver.c
2008-05-12 08:22:04.000000000 +0200
+++ linux-2.6.26-rc2/drivers/media/video/cx18/cx18-driver.c 2008-05-13
19:12:56.000000000 +0200
@@ -620,7 +620,7 @@ static int __devinit cx18_probe(struct p
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);
--- linux-2.6.26-rc2.orig/drivers/media/video/ivtv/ivtv-driver.c
2008-05-04 09:49:51.000000000 +0200
+++ linux-2.6.26-rc2/drivers/media/video/ivtv/ivtv-driver.c 2008-05-13
19:12:51.000000000 +0200
@@ -1015,7 +1015,7 @@ static int __devinit ivtv_probe(struct p
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);
--
Jean Delvare
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel