aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_usb_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-13 16:37:36 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-15 09:26:23 +0200
commit13d5e89e029784d9dba5e93d3be71af08cdfd502 (patch)
tree49a4e42f8043e2c447f3e3e3c12002dae2adbf93 /executor/common_usb_linux.h
parentb458f2c1a61c78e2004be6b4ef60b45fb81bd684 (diff)
executor: remove NONFAILING from pseudo-syscalls
This is not needed anymore afer the previous commit. Fixes #1918
Diffstat (limited to 'executor/common_usb_linux.h')
-rw-r--r--executor/common_usb_linux.h14
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);