mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 13:13:21 +00:00
Define LWIP_CHKSUM_COPY_ALGORITHM when port provides LWIP_CHKSUM_COPY macro
When the port has LWIP_CHECKSUM_ON_COPY enabled and provides a definition of LWIP_CHKSUM_COPY, the existing logic left LWIP_CHKSUM_COPY_ALGORITHM undefined In this case we want it to be defined to 0 since none of the copy checksum algorithms provided are being used This commit also introduces indentation matching LWIP_CHKSUM to improve the readability of the code
This commit is contained in:
parent
0a67c06b51
commit
96373f6959
@ -56,14 +56,16 @@
|
||||
#if LWIP_CHECKSUM_ON_COPY
|
||||
/** Function-like macro: same as MEMCPY but returns the checksum of copied data
|
||||
as u16_t */
|
||||
#ifndef LWIP_CHKSUM_COPY
|
||||
#define LWIP_CHKSUM_COPY(dst, src, len) lwip_chksum_copy(dst, src, len)
|
||||
#ifndef LWIP_CHKSUM_COPY_ALGORITHM
|
||||
#define LWIP_CHKSUM_COPY_ALGORITHM 1
|
||||
#endif /* LWIP_CHKSUM_COPY_ALGORITHM */
|
||||
#endif /* LWIP_CHKSUM_COPY */
|
||||
# ifndef LWIP_CHKSUM_COPY
|
||||
# define LWIP_CHKSUM_COPY(dst, src, len) lwip_chksum_copy(dst, src, len)
|
||||
# ifndef LWIP_CHKSUM_COPY_ALGORITHM
|
||||
# define LWIP_CHKSUM_COPY_ALGORITHM 1
|
||||
# endif /* LWIP_CHKSUM_COPY_ALGORITHM */
|
||||
# else /* LWIP_CHKSUM_COPY */
|
||||
# define LWIP_CHKSUM_COPY_ALGORITHM 0
|
||||
# endif /* LWIP_CHKSUM_COPY */
|
||||
#else /* LWIP_CHECKSUM_ON_COPY */
|
||||
#define LWIP_CHKSUM_COPY_ALGORITHM 0
|
||||
# define LWIP_CHKSUM_COPY_ALGORITHM 0
|
||||
#endif /* LWIP_CHECKSUM_ON_COPY */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user