mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-07 05:30:14 +00:00
Minor changes (tabs, ident, coding style...)
This commit is contained in:
parent
c517f6daf9
commit
2be122875a
@ -71,7 +71,7 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p,
|
||||
|
||||
if ((conn != NULL) && (conn->recvmbox != SYS_MBOX_NULL)) {
|
||||
buf = memp_malloc(MEMP_NETBUF);
|
||||
if (!buf) {
|
||||
if (buf == NULL) {
|
||||
return 0;
|
||||
}
|
||||
pbuf_ref(p);
|
||||
|
@ -245,14 +245,14 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||
etharp_arp_input(netif, (struct eth_addr*)(netif->hwaddr), p);
|
||||
break;
|
||||
|
||||
#if PPPOE_SUPPORT > 0
|
||||
case ETHTYPE_PPPOEDISC: /* PPP Over Ethernet Discovery Stage */
|
||||
pppoe_disc_input(netif, p);
|
||||
break;
|
||||
case ETHTYPE_PPPOE: /* PPP Over Ethernet Session Stage */
|
||||
pppoe_data_input(netif, p);
|
||||
break;
|
||||
#endif
|
||||
#if PPPOE_SUPPORT
|
||||
case ETHTYPE_PPPOEDISC: /* PPP Over Ethernet Discovery Stage */
|
||||
pppoe_disc_input(netif, p);
|
||||
break;
|
||||
case ETHTYPE_PPPOE: /* PPP Over Ethernet Session Stage */
|
||||
pppoe_data_input(netif, p);
|
||||
break;
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
|
||||
default:
|
||||
pbuf_free(p);
|
||||
|
@ -503,12 +503,12 @@ mem_malloc(mem_size_t size)
|
||||
|
||||
void *mem_calloc(size_t count, size_t size)
|
||||
{
|
||||
void *p;
|
||||
void *p;
|
||||
|
||||
p = mem_malloc(count * size);
|
||||
if(p) {
|
||||
memset(p, 0, count * size);
|
||||
}
|
||||
return p;
|
||||
p = mem_malloc(count * size);
|
||||
if(p) {
|
||||
memset(p, 0, count * size);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
#endif /* !MEM_LIBC_MALLOC */
|
||||
|
@ -301,8 +301,9 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
}
|
||||
|
||||
if (recv_data != NULL) {
|
||||
if(flags & TCP_PSH)
|
||||
recv_data->flgs |= PBUF_FLAG_PUSH;
|
||||
if(flags & TCP_PSH) {
|
||||
recv_data->flgs |= PBUF_FLAG_PUSH;
|
||||
}
|
||||
/* Notify application that data has been received. */
|
||||
TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ void mem_init(void);
|
||||
void *mem_realloc(void *mem, mem_size_t size);
|
||||
#endif /* MEM_USE_POOLS */
|
||||
void *mem_malloc(mem_size_t size);
|
||||
void mem_free(void *mem);
|
||||
void *mem_calloc(size_t count, size_t size);
|
||||
void mem_free(void *mem);
|
||||
#endif /* MEM_LIBC_MALLOC */
|
||||
|
||||
#ifndef LWIP_MEM_ALIGN_SIZE
|
||||
|
@ -119,8 +119,8 @@ PACK_STRUCT_END
|
||||
/** 5 seconds period */
|
||||
#define ARP_TMR_INTERVAL 5000
|
||||
|
||||
#define ETHTYPE_ARP 0x0806
|
||||
#define ETHTYPE_IP 0x0800
|
||||
#define ETHTYPE_ARP 0x0806
|
||||
#define ETHTYPE_IP 0x0800
|
||||
#define ETHTYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */
|
||||
#define ETHTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */
|
||||
|
||||
|
@ -288,14 +288,14 @@ ethernetif_input(struct netif *netif)
|
||||
#endif /* ETHARP_TCPIP_INPUT */
|
||||
#endif /* ETHARP_TCPIP_ETHINPUT */
|
||||
|
||||
#if PPPOE_SUPPORT > 0
|
||||
#if PPPOE_SUPPORT
|
||||
case ETHTYPE_PPPOEDISC: /* PPP Over Ethernet Discovery Stage */
|
||||
pppoe_disc_input(netif, p);
|
||||
break;
|
||||
pppoe_disc_input(netif, p);
|
||||
break;
|
||||
case ETHTYPE_PPPOE: /* PPP Over Ethernet Session Stage */
|
||||
pppoe_data_input(netif, p);
|
||||
break;
|
||||
#endif
|
||||
pppoe_data_input(netif, p);
|
||||
break;
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
|
||||
default:
|
||||
pbuf_free(p);
|
||||
|
Loading…
Reference in New Issue
Block a user