Skip to content

Commit 556b32a

Browse files
Robpaanordicjm
authored andcommitted
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 <[email protected]>
1 parent 69858eb commit 556b32a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

boot/boot_serial/src/boot_serial.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,6 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout)
11691169
return 0;
11701170
}
11711171

1172-
if (len > *out_off - sizeof(uint16_t)) {
1173-
len = *out_off - sizeof(uint16_t);
1174-
}
1175-
11761172
out += sizeof(uint16_t);
11771173
#ifdef __ZEPHYR__
11781174
crc = crc16_itu_t(CRC16_INITIAL_CRC, out, len);

0 commit comments

Comments
 (0)