Staging: crystalhd: don't waste the last char of buffer

pinfo->name is a 32 char buffer.  In the original code, the last char
wasn't fully utilized.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Dan Carpenter 2011-03-14 12:35:31 +03:00 committed by Greg Kroah-Hartman
parent a3b6ff0352
commit e278913c3c
1 changed files with 1 additions and 1 deletions

View File

@ -562,7 +562,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
return rc;
}
snprintf(pinfo->name, 31, "crystalhd_pci_e:%d:%d:%d",
snprintf(pinfo->name, sizeof(pinfo->name), "crystalhd_pci_e:%d:%d:%d",
pdev->bus->number, PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn));