summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-04-08 20:55:42 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-04-08 20:55:42 +0000
commit5c2165eecaee59be7baff7edabf3170edc59f4d2 (patch)
tree0bdcc4fa1e9cb1d7566b0b690646e0649e218d29
parentd86bfb608649a6a376db9bf1ae66742c61d53916 (diff)
If the vendor name is NULL, do not output a leading space; reported by deraadt@
-rw-r--r--sys/dev/usb/usb_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 77d7eab65c1..0f41f19c5a3 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_subr.c,v 1.9 2000/03/30 16:19:33 aaron Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.10 2000/04/08 20:55:41 aaron Exp $ */
/* $NetBSD: usb_subr.c,v 1.71 2000/03/29 18:24:53 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -283,7 +283,7 @@ usbd_devinfo(dev, showclass, cp)
int bcdDevice, bcdUSB;
usbd_devinfo_vp(dev, vendor, product);
- cp += sprintf(cp, "%s %s", vendor, product);
+ cp += sprintf(cp, "%s%s%s", vendor, *vendor ? " " : "", product);
if (showclass)
cp += sprintf(cp, ", class %d/%d",
udd->bDeviceClass, udd->bDeviceSubClass);