Staging: crystalhd: don't waste the last char of buffer
Subsystems (2)
PATCH 2/2 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 <[email protected]>
drivers/staging/crystalhd/crystalhd_lnx.c +1 -1
@@ -562,7 +562,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev, goto err; } -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));
Re: [patch 2/2] Staging: crystalhd: don't waste the last char of
Quoted 4 lines · Dan Carpenter
pinfo->nameis a 32 char buffer. In the original code, the last char wasn't fully utilized.Signed-off-by Dan Carpenter <[email protected]>
Acked-by Jarod Wilson <[email protected]>
Signature · 2 lines
Jarod Wilson [email protected]