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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
54b6550e43
commit
b4ac3c8d8d
@ -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);
|
||||
|
Reference in New Issue
Block a user