Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb usb: Fix debug build.



details:   https://anonhg.NetBSD.org/src/rev/2c33c1164ba7
branches:  trunk
changeset: 363494:2c33c1164ba7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Mar 13 20:44:06 2022 +0000

description:
usb: Fix debug build.

diffstat:

 sys/dev/usb/usb_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 2601734ffc4b -r 2c33c1164ba7 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Sun Mar 13 19:32:07 2022 +0000
+++ b/sys/dev/usb/usb_subr.c    Sun Mar 13 20:44:06 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.273 2022/03/13 13:18:22 riastradh Exp $ */
+/*     $NetBSD: usb_subr.c,v 1.274 2022/03/13 20:44:06 riastradh Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.273 2022/03/13 13:18:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.274 2022/03/13 20:44:06 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -561,10 +561,10 @@
        for (endpt = 0; endpt < nendpt; endpt++) {
                DPRINTFN(10, "endpt=%jd", endpt, 0, 0, 0);
                for (; end - p >= sizeof(*desc); p += desc->bLength) {
+                       desc = (usb_descriptor_t *)p;
                        DPRINTFN(10, "p=%#jx end=%#jx len=%jd type=%jd",
                            (uintptr_t)p, (uintptr_t)end, desc->bLength,
                            desc->bDescriptorType);
-                       desc = (usb_descriptor_t *)p;
                        if (desc->bLength < sizeof(*desc)) {
                                printf("%s: bad descriptor: too short\n",
                                    __func__);



Home | Main Index | Thread Index | Old Index