Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2018 13:17:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 233606] bhyve: usb_mouse.c has dead code
Message-ID:  <bug-233606-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233606

            Bug ID: 233606
           Summary: bhyve: usb_mouse.c has dead code
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: levon@movementarian.org

usr.sbin/bhyve/usb_mouse.c has this code:

static int
umouse_request(void *scarg, struct usb_data_xfer *xfer)
...
done:
        if (xfer->ureq && (xfer->ureq->bmRequestType & UT_WRITE) &&
            (err =3D=3D USB_ERR_NORMAL_COMPLETION) && (data !=3D NULL))
                data->blen =3D 0;
        else if (eshort)
                err =3D USB_ERR_SHORT_XFER;

However, UT_WRITE is 0, so this doesn't do what the author seems to have
expected.

Found with smatch; impact unknown.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233606-227>