Skip to content

Commit

Permalink
boot: Removed unnecessary if-statement
Browse files Browse the repository at this point in the history
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 <robert@paananen.nu>
  • Loading branch information
Robpaa authored and nordicjm committed Apr 18, 2024
1 parent 69858eb commit 556b32a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions boot/boot_serial/src/boot_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 556b32a

Please sign in to comment.