Skip to content

Commit

Permalink
Staging: crystalhd: don't waste the last char of buffer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent a3b6ff0 commit e278913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/crystalhd/crystalhd_lnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit e278913

Please sign in to comment.