From 556b32a679d177169fb802bb347d3557eeb759e9 Mon Sep 17 00:00:00 2001 From: Robert Paananen Date: Wed, 17 Apr 2024 09:22:16 +0200 Subject: [PATCH] boot: Removed unnecessary if-statement If-statement checks if length is greater than some value right after a check if it is equal to the same value. This will never be true. Signed-off-by: Robert Paananen --- boot/boot_serial/src/boot_serial.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/boot/boot_serial/src/boot_serial.c b/boot/boot_serial/src/boot_serial.c index b631e150f..11ba341ad 100644 --- a/boot/boot_serial/src/boot_serial.c +++ b/boot/boot_serial/src/boot_serial.c @@ -1169,10 +1169,6 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout) return 0; } - if (len > *out_off - sizeof(uint16_t)) { - len = *out_off - sizeof(uint16_t); - } - out += sizeof(uint16_t); #ifdef __ZEPHYR__ crc = crc16_itu_t(CRC16_INITIAL_CRC, out, len);