summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2000-09-07 20:38:56 +0000
committeraaron <aaron@openbsd.org>2000-09-07 20:38:56 +0000
commit23b6d3de42b6bba179d4bef4e7b9cf5f330f9473 (patch)
tree19fc43e03e073e100c7a49c1d3ad3528cdab1a23
parentcleanup copyright notices on all files. I have attempted to be accurate with (diff)
downloadwireguard-openbsd-23b6d3de42b6bba179d4bef4e7b9cf5f330f9473.tar.xz
wireguard-openbsd-23b6d3de42b6bba179d4bef4e7b9cf5f330f9473.zip
Put back a fix that fgsch@ whacked during the last NetBSD USB sync:
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 b7c1f8a867c..9e34225bea1 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.12 2000/07/04 11:44:25 fgsch Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.13 2000/09/07 20:38:56 aaron Exp $ */
/* $NetBSD: usb_subr.c,v 1.72 2000/04/14 14:13:56 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);