]> Zhao Yanbai Git Server - minix.git/commitdiff
Use or instead of and to determine if urb is valid 50/2950/1
authorJacob Adams <tookmund@gmail.com>
Mon, 2 Feb 2015 03:56:49 +0000 (22:56 -0500)
committerLionel Sambuc <lionel@minix3.org>
Wed, 11 Mar 2015 16:56:09 +0000 (17:56 +0100)
close #24

Change-Id: I12e2b20d69aa7b186a8e5cd0dc16f653a18b2ee2

minix/lib/libddekit/src/usb_server.c

index df200435c9ad8644890f38470cdd29c41fa040f7..1ef3451b50581dd0b1b66e4582f5bb8ab56fede6 100644 (file)
@@ -329,7 +329,7 @@ static void submit_urb(message *msg)
                
                DEBUG_MSG("URB type: %d", mx_urb->type);
                /* check if urb is valid */
-               if (mx_urb->dev_id >= MAX_DEVS && mx_urb->dev_id < 0) {
+               if (mx_urb->dev_id >= MAX_DEVS || mx_urb->dev_id < 0) {
                        DEBUG_MSG("Bogus device ID.");
                        res = EINVAL;
                        goto out;