From 7effdfc2751cc8edee3039e111f93cad62ce1bf4 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 5 Apr 2019 23:29:19 +0200 Subject: [PATCH] style --- uart/uart_posix.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/uart/uart_posix.c b/uart/uart_posix.c index 4c9e8b990..fc5eced7f 100644 --- a/uart/uart_posix.c +++ b/uart/uart_posix.c @@ -231,7 +231,6 @@ void uart_close(const serial_port sp) { } bool uart_receive(const serial_port sp, uint8_t *pbtRx, size_t pszMaxRxLen, size_t *pszRxLen) { - int res; int byteCount; fd_set rfds; struct timeval tv; @@ -244,7 +243,7 @@ bool uart_receive(const serial_port sp, uint8_t *pbtRx, size_t pszMaxRxLen, size FD_ZERO(&rfds); FD_SET(((serial_port_unix *)sp)->fd, &rfds); tv = timeout; - res = select(((serial_port_unix *)sp)->fd + 1, &rfds, NULL, NULL, &tv); + int res = select(((serial_port_unix *)sp)->fd + 1, &rfds, NULL, NULL, &tv); // Read error if (res < 0) { @@ -290,7 +289,6 @@ bool uart_receive(const serial_port sp, uint8_t *pbtRx, size_t pszMaxRxLen, size } bool uart_send(const serial_port sp, const uint8_t *pbtTx, const size_t len) { - int32_t res; size_t pos = 0; fd_set rfds; struct timeval tv; @@ -300,7 +298,7 @@ bool uart_send(const serial_port sp, const uint8_t *pbtTx, const size_t len) { FD_ZERO(&rfds); FD_SET(((serial_port_unix *)sp)->fd, &rfds); tv = timeout; - res = select(((serial_port_unix *)sp)->fd + 1, NULL, &rfds, NULL, &tv); + int res = select(((serial_port_unix *)sp)->fd + 1, NULL, &rfds, NULL, &tv); // Write error if (res < 0) {