From dc0077241b0a080b43c7ef101b9d70b4cd910ee3 Mon Sep 17 00:00:00 2001 From: Jacob Adams Date: Sun, 1 Feb 2015 22:56:49 -0500 Subject: [PATCH] Use or instead of and to determine if urb is valid close #24 Change-Id: I12e2b20d69aa7b186a8e5cd0dc16f653a18b2ee2 --- minix/lib/libddekit/src/usb_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;