diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-04-08 20:55:42 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-04-08 20:55:42 +0000 |
commit | 5c2165eecaee59be7baff7edabf3170edc59f4d2 (patch) | |
tree | 0bdcc4fa1e9cb1d7566b0b690646e0649e218d29 | |
parent | d86bfb608649a6a376db9bf1ae66742c61d53916 (diff) |
If the vendor name is NULL, do not output a leading space; reported by deraadt@
-rw-r--r-- | sys/dev/usb/usb_subr.c | 4 |
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); |