From cc80db955d0551c2456692da6176530dd27e08ed Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 1 Oct 2021 16:01:47 +0200 Subject: 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. --- executor/common_usb.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'executor/common_usb.h') 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; } -- cgit mrf-deployment