summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/vbus.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-11-11 17:58:24 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-11-11 17:58:24 +0000
commit4f8f33d4754fe7616e7e679753278d8f067b4a7f (patch)
tree38f637749f99436a692ab996861c50f553855ac8 /sys/arch/sparc64/dev/vbus.c
parentbce39a0192683b0360f8d3e08beb164c2de4be2f (diff)
Replace snprintf(foo, sizeof foo, "%s", ...) with strlcpy. ok deraadt@ krw@
Diffstat (limited to 'sys/arch/sparc64/dev/vbus.c')
-rw-r--r--sys/arch/sparc64/dev/vbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/vbus.c b/sys/arch/sparc64/dev/vbus.c
index 79d5963cf73..785ab7e2e7d 100644
--- a/sys/arch/sparc64/dev/vbus.c
+++ b/sys/arch/sparc64/dev/vbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vbus.c,v 1.4 2008/12/30 21:23:33 kettenis Exp $ */
+/* $OpenBSD: vbus.c,v 1.5 2010/11/11 17:58:23 miod Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
@@ -235,7 +235,7 @@ vbus_alloc_bus_tag(struct vbus_softc *sc, bus_space_tag_t parent)
if (bt == NULL)
panic("could not allocate vbus bus tag");
- snprintf(bt->name, sizeof(bt->name), "%s", sc->sc_dv.dv_xname);
+ strlcpy(bt->name, sc->sc_dv.dv_xname, sizeof(bt->name));
bt->cookie = sc;
bt->parent = parent;
bt->asi = parent->asi;