mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 09:19:53 +00:00
Use macros to compare IP addresses
This commit is contained in:
parent
c58dfa2156
commit
d51d6b2d89
@ -175,8 +175,8 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf *pb)
|
||||
* again & we don't have to do any reordering if it's used.
|
||||
*/
|
||||
INCR(vjs_packets);
|
||||
if (ip->src.addr != cs->cs_ip.src.addr
|
||||
|| ip->dest.addr != cs->cs_ip.dest.addr
|
||||
if (!ip_addr_cmp(&ip->src, &cs->cs_ip.src)
|
||||
|| !ip_addr_cmp(&ip->dest, &cs->cs_ip.dest)
|
||||
|| *(long *)th != ((long *)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
|
||||
/*
|
||||
* Wasn't the first -- search for it.
|
||||
@ -196,8 +196,8 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf *pb)
|
||||
do {
|
||||
lcs = cs; cs = cs->cs_next;
|
||||
INCR(vjs_searches);
|
||||
if (ip->src.addr == cs->cs_ip.src.addr
|
||||
&& ip->dest.addr == cs->cs_ip.dest.addr
|
||||
if (ip_addr_cmp(&ip->src, &cs->cs_ip.src)
|
||||
&& ip_addr_cmp(&ip->dest, &cs->cs_ip.dest)
|
||||
&& *(long *)th == ((long *)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
|
||||
goto found;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user