mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
fix NULL checks (compiler error, tcp_rst allows pcb==NULL)
This commit is contained in:
parent
31bc2f9b20
commit
e7c0619189
@ -1534,10 +1534,13 @@ tcp_txnow(void)
|
||||
err_t
|
||||
tcp_process_refused_data(struct tcp_pcb *pcb)
|
||||
{
|
||||
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
|
||||
struct pbuf *rest;
|
||||
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
|
||||
|
||||
LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
|
||||
|
||||
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
|
||||
struct pbuf *rest;
|
||||
while (pcb->refused_data != NULL)
|
||||
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
|
||||
{
|
||||
|
@ -1886,7 +1886,7 @@ tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags
|
||||
#endif
|
||||
|
||||
#if LWIP_TCP_SACK_OUT
|
||||
if (num_sacks > 0) {
|
||||
if (pcb && (num_sacks > 0)) {
|
||||
tcp_build_sack_option(pcb, opts, num_sacks);
|
||||
/* 1 word for SACKs header (including 2xNOP), and 2 words for each SACK */
|
||||
sacks_len = 1 + num_sacks * 2;
|
||||
@ -1979,7 +1979,6 @@ tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
|
||||
u16_t wnd;
|
||||
u8_t optlen;
|
||||
|
||||
LWIP_ASSERT("tcp_rst: invalid pcb", pcb != NULL);
|
||||
LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
|
||||
LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user