From f5ecae48f1f49cda86b1fbd9c263fc6cc0510a69 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 19 Aug 2022 00:47:58 +0100 Subject: [PATCH] usb_serial: clang-foramt cleanup of debug_uart_write() --- src/platforms/common/usb_serial.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/platforms/common/usb_serial.c b/src/platforms/common/usb_serial.c index 4e34848..e55a659 100644 --- a/src/platforms/common/usb_serial.c +++ b/src/platforms/common/usb_serial.c @@ -194,10 +194,8 @@ size_t debug_uart_write(const char *buf, const size_t len) CM_ATOMIC_CONTEXT(); - for (size_t i = 0; i < len && (usb_dbg_in + 1) % RX_FIFO_SIZE != usb_dbg_out; ++i) - { - if (buf[i] == '\n') - { + for (size_t i = 0; i < len && (usb_dbg_in + 1) % RX_FIFO_SIZE != usb_dbg_out; ++i) { + if (buf[i] == '\n') { usb_dbg_buf[usb_dbg_in++] = '\r'; usb_dbg_in %= RX_FIFO_SIZE; @@ -209,7 +207,6 @@ size_t debug_uart_write(const char *buf, const size_t len) } usbuart_run(); - return len; }