aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_usb.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-10-01 16:01:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-10-01 16:38:35 +0200
commitcc80db955d0551c2456692da6176530dd27e08ed (patch)
tree52eb201e3fb5af9168db095fbd5fcebaf2961d9d /executor/common_usb.h
parent1d849ab4d892af13a249f75628790b47e42b7c74 (diff)
executor: check for single-line compound statements
Historically the code base does not use single-line compound statements ({} around single-line blocks). But there are few precedents creeped into already. Add a check to keep the code base consistent.
Diffstat (limited to 'executor/common_usb.h')
-rw-r--r--executor/common_usb.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/executor/common_usb.h b/executor/common_usb.h
index 35793f4d7..361605b0e 100644
--- a/executor/common_usb.h
+++ b/executor/common_usb.h
@@ -117,9 +117,8 @@ static struct usb_device_index* add_usb_index(int fd, const char* dev, size_t de
static struct usb_device_index* lookup_usb_index(int fd)
{
for (int i = 0; i < USB_MAX_FDS; i++) {
- if (__atomic_load_n(&usb_devices[i].fd, __ATOMIC_ACQUIRE) == fd) {
+ if (__atomic_load_n(&usb_devices[i].fd, __ATOMIC_ACQUIRE) == fd)
return &usb_devices[i].index;
- }
}
return NULL;
}