Restructured the code a bit to help my dump compiler not creating a jump table in ROM

This commit is contained in:
goldsimon 2011-06-07 19:07:00 +00:00 committed by goldsimon
parent fe2003124a
commit 59513b41e5

View File

@ -177,22 +177,22 @@ tcpip_input(struct pbuf *p, struct netif *inp)
#else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */
struct tcpip_msg *msg; struct tcpip_msg *msg;
if (sys_mbox_valid(&mbox)) { if (!sys_mbox_valid(&mbox)) {
msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); return ERR_VAL;
if (msg == NULL) {
return ERR_MEM;
}
msg->type = TCPIP_MSG_INPKT;
msg->msg.inp.p = p;
msg->msg.inp.netif = inp;
if (sys_mbox_trypost(&mbox, msg) != ERR_OK) {
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
return ERR_MEM;
}
return ERR_OK;
} }
return ERR_VAL; msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT);
if (msg == NULL) {
return ERR_MEM;
}
msg->type = TCPIP_MSG_INPKT;
msg->msg.inp.p = p;
msg->msg.inp.netif = inp;
if (sys_mbox_trypost(&mbox, msg) != ERR_OK) {
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
return ERR_MEM;
}
return ERR_OK;
#endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
} }