diff options
Diffstat (limited to 'executor/common_usb_linux.h')
| -rw-r--r-- | executor/common_usb_linux.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/executor/common_usb_linux.h b/executor/common_usb_linux.h index f9d30d33b..8b4043271 100644 --- a/executor/common_usb_linux.h +++ b/executor/common_usb_linux.h @@ -293,7 +293,7 @@ static volatile long syz_usb_connect_impl(uint64 speed, uint64 dev_len, const ch debug("syz_usb_connect: add_usb_index success\n"); #if USB_DEBUG - NONFAILING(analyze_usb_device(index)); + analyze_usb_device(index); #endif // TODO: consider creating two dummy_udc's per proc to increace the chance of @@ -339,9 +339,7 @@ static volatile long syz_usb_connect_impl(uint64 speed, uint64 dev_len, const ch uint32 response_length = 0; if (event.ctrl.bRequestType & USB_DIR_IN) { - bool response_found = false; - NONFAILING(response_found = lookup_connect_response_in(fd, descs, &event.ctrl, &response_data, &response_length)); - if (!response_found) { + if (!lookup_connect_response_in(fd, descs, &event.ctrl, &response_data, &response_length)) { debug("syz_usb_connect: unknown request, stalling\n"); usb_raw_ep0_stall(fd); continue; @@ -451,13 +449,11 @@ static volatile long syz_usb_control_io(volatile long a0, volatile long a1, vola analyze_control_request(fd, &event.ctrl); #endif - bool response_found = false; char* response_data = NULL; uint32 response_length = 0; if ((event.ctrl.bRequestType & USB_DIR_IN) && event.ctrl.wLength) { - NONFAILING(response_found = lookup_control_response(descs, resps, &event.ctrl, &response_data, &response_length)); - if (!response_found) { + if (!lookup_control_response(descs, resps, &event.ctrl, &response_data, &response_length)) { debug("syz_usb_connect: unknown request, stalling\n"); usb_raw_ep0_stall(fd); return -1; @@ -538,7 +534,7 @@ static volatile long syz_usb_ep_write(volatile long a0, volatile long a1, volati if (len > sizeof(io_data.data)) len = sizeof(io_data.data); io_data.inner.length = len; - NONFAILING(memcpy(&io_data.data[0], data, len)); + memcpy(&io_data.data[0], data, len); int rv = usb_raw_ep_write(fd, (struct usb_raw_ep_io*)&io_data); if (rv < 0) { @@ -580,7 +576,7 @@ static volatile long syz_usb_ep_read(volatile long a0, volatile long a1, volatil return rv; } - NONFAILING(memcpy(&data[0], &io_data.data[0], io_data.inner.length)); + memcpy(&data[0], &io_data.data[0], io_data.inner.length); debug("syz_usb_ep_read: received data:\n"); debug_dump_data(&io_data.data[0], io_data.inner.length); |
