mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
* pbuf.c, ppp.c: Fix warnings on some systems with mem_malloc.
This commit is contained in:
parent
30d4c243ec
commit
f067d34392
@ -599,6 +599,7 @@ HISTORY
|
|||||||
2008-03-04 Jonathan Larmour
|
2008-03-04 Jonathan Larmour
|
||||||
* mem.c, stats.c, mem.h: apply patch #6414 to avoid compiler errors
|
* mem.c, stats.c, mem.h: apply patch #6414 to avoid compiler errors
|
||||||
and/or warnings on some systems where mem_size_t and size_t differ.
|
and/or warnings on some systems where mem_size_t and size_t differ.
|
||||||
|
* pbuf.c, ppp.c: Fix warnings on some systems with mem_malloc.
|
||||||
|
|
||||||
2008-03-04 Kieran Mansley (contributions by others)
|
2008-03-04 Kieran Mansley (contributions by others)
|
||||||
* Numerous small compiler error/warning fixes from contributions to
|
* Numerous small compiler error/warning fixes from contributions to
|
||||||
|
@ -207,7 +207,7 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
|
|||||||
break;
|
break;
|
||||||
case PBUF_RAM:
|
case PBUF_RAM:
|
||||||
/* If pbuf is to be allocated in RAM, allocate memory for it. */
|
/* If pbuf is to be allocated in RAM, allocate memory for it. */
|
||||||
p = mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length));
|
p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length));
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ pppInit(void)
|
|||||||
|
|
||||||
subnetMask = htonl(0xffffff00);
|
subnetMask = htonl(0xffffff00);
|
||||||
|
|
||||||
outpacket_buf[i] = mem_malloc(PPP_MRU+PPP_HDRLEN);
|
outpacket_buf[i] = (u_char *)mem_malloc(PPP_MRU+PPP_HDRLEN);
|
||||||
if(!outpacket_buf[i]) {
|
if(!outpacket_buf[i]) {
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user