projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3b6ff0
)
Staging: crystalhd: don't waste the last char of buffer
author
Dan Carpenter
<error27@gmail.com>
Mon, 14 Mar 2011 09:35:31 +0000
(12:35 +0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 14 Mar 2011 18:47:59 +0000
(11:47 -0700)
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>
drivers/staging/crystalhd/crystalhd_lnx.c
patch
|
blob
|
history
diff --git
a/drivers/staging/crystalhd/crystalhd_lnx.c
b/drivers/staging/crystalhd/crystalhd_lnx.c
index 9a6b650cd608d4308fc1915c34b8e3f6382f3d14..c1ee24c98315ad4001b65e4de6d3d426f1763a07 100644
(file)
--- a/
drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/
drivers/staging/crystalhd/crystalhd_lnx.c
@@
-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));