From: Jacob Adams Date: Mon, 2 Feb 2015 03:56:49 +0000 (-0500) Subject: Use or instead of and to determine if urb is valid X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F2950%2F1;p=minix.git Use or instead of and to determine if urb is valid close #24 Change-Id: I12e2b20d69aa7b186a8e5cd0dc16f653a18b2ee2 --- diff --git a/minix/lib/libddekit/src/usb_server.c b/minix/lib/libddekit/src/usb_server.c index df200435c..1ef3451b5 100644 --- a/minix/lib/libddekit/src/usb_server.c +++ b/minix/lib/libddekit/src/usb_server.c @@ -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;