summaryrefslogtreecommitdiff
path: root/sys/dev/pci/uhci_pci.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2004-12-31 04:22:33 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2004-12-31 04:22:33 +0000
commita0f8a7c8c1d44906df87778f54b3e7322d9c80a1 (patch)
tree7a8c217b1ebd1680e3371a1718a850a4ec1a7f9c /sys/dev/pci/uhci_pci.c
parenta0e0d972e06365e4650d1115f665c5e026dce450 (diff)
strncpy -> strlcpy
Diffstat (limited to 'sys/dev/pci/uhci_pci.c')
-rw-r--r--sys/dev/pci/uhci_pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c
index 2ff8a2d0e04..e853fc50153 100644
--- a/sys/dev/pci/uhci_pci.c
+++ b/sys/dev/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci_pci.c,v 1.17 2004/05/24 22:52:52 mickey Exp $ */
+/* $OpenBSD: uhci_pci.c,v 1.18 2004/12/31 04:22:32 dlg Exp $ */
/* $NetBSD: uhci_pci.c,v 1.24 2002/10/02 16:51:58 thorpej Exp $ */
/*
@@ -175,10 +175,9 @@ uhci_pci_attach(struct device *parent, struct device *self, void *aux)
vendor = pci_findvendor(pa->pa_id);
sc->sc.sc_id_vendor = PCI_VENDOR(pa->pa_id);
if (vendor)
- strncpy(sc->sc.sc_vendor, vendor,
- sizeof(sc->sc.sc_vendor) - 1);
+ strlcpy(sc->sc.sc_vendor, vendor, sizeof (sc->sc.sc_vendor));
else
- snprintf(sc->sc.sc_vendor, sizeof sc->sc.sc_vendor,
+ snprintf(sc->sc.sc_vendor, sizeof (sc->sc.sc_vendor),
"vendor 0x%04x", PCI_VENDOR(pa->pa_id));
r = uhci_init(&sc->sc);