mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-11 08:54:38 +08:00
Use braces for if blocks
This commit is contained in:
parent
df7e435b86
commit
b6babe38ea
@ -687,8 +687,9 @@ ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest)
|
|||||||
|
|
||||||
/* Set new offset and MF flag */
|
/* Set new offset and MF flag */
|
||||||
tmp = omf | (IP_OFFMASK & (ofo));
|
tmp = omf | (IP_OFFMASK & (ofo));
|
||||||
if (!last)
|
if (!last) {
|
||||||
tmp = tmp | IP_MF;
|
tmp = tmp | IP_MF;
|
||||||
|
}
|
||||||
|
|
||||||
/* Fill this fragment */
|
/* Fill this fragment */
|
||||||
cop = last ? left : nfb * 8;
|
cop = last ? left : nfb * 8;
|
||||||
@ -735,8 +736,9 @@ ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest)
|
|||||||
*/
|
*/
|
||||||
pbuf_cat(rambuf, newpbuf);
|
pbuf_cat(rambuf, newpbuf);
|
||||||
left_to_copy -= newpbuflen;
|
left_to_copy -= newpbuflen;
|
||||||
if (left_to_copy)
|
if (left_to_copy) {
|
||||||
p = p->next;
|
p = p->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
poff = newpbuflen;
|
poff = newpbuflen;
|
||||||
#endif /* IP_FRAG_USES_STATIC_BUF */
|
#endif /* IP_FRAG_USES_STATIC_BUF */
|
||||||
@ -748,8 +750,9 @@ ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest)
|
|||||||
IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));
|
IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));
|
||||||
|
|
||||||
#if IP_FRAG_USES_STATIC_BUF
|
#if IP_FRAG_USES_STATIC_BUF
|
||||||
if (last)
|
if (last) {
|
||||||
pbuf_realloc(rambuf, left + IP_HLEN);
|
pbuf_realloc(rambuf, left + IP_HLEN);
|
||||||
|
}
|
||||||
|
|
||||||
/* This part is ugly: we alloc a RAM based pbuf for
|
/* This part is ugly: we alloc a RAM based pbuf for
|
||||||
* the link level header for each chunk and then
|
* the link level header for each chunk and then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user