zephyr: fix build with zephyr
zephyr macro min() was hanged to MIN()
Kconfig key CDC_ACM_PORT_NAME was changed to CDC_ACM_PORT_NAME_0
zephyr sha of the fixing time is 406dc2cb0e2868392f444677ace416440695829f.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/boot_serial/src/boot_serial.c b/boot/boot_serial/src/boot_serial.c
index bf1474e..1ea009b 100644
--- a/boot/boot_serial/src/boot_serial.c
+++ b/boot/boot_serial/src/boot_serial.c
@@ -588,7 +588,11 @@
if (len != *out_off - sizeof(uint16_t)) {
return 0;
}
- len = min(len, *out_off - sizeof(uint16_t));
+
+ if (len > *out_off - sizeof(uint16_t)) {
+ len = *out_off - sizeof(uint16_t);
+ }
+
out += sizeof(uint16_t);
#ifdef __ZEPHYR__
crc = crc16(out, len, CRC_CITT_POLYMINAL, CRC16_INITIAL_CRC, true);