slirp: remove dead assignments, spotted by clang
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
a990f58fed
commit
aca9fcd28e
|
@ -597,7 +597,7 @@ findso:
|
||||||
*ip=save_ip;
|
*ip=save_ip;
|
||||||
icmp_error(m, ICMP_UNREACH,code, 0,strerror(errno));
|
icmp_error(m, ICMP_UNREACH,code, 0,strerror(errno));
|
||||||
}
|
}
|
||||||
tp = tcp_close(tp);
|
tcp_close(tp);
|
||||||
m_free(m);
|
m_free(m);
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
@ -660,8 +660,9 @@ findso:
|
||||||
goto dropwithreset;
|
goto dropwithreset;
|
||||||
|
|
||||||
if (tiflags & TH_RST) {
|
if (tiflags & TH_RST) {
|
||||||
if (tiflags & TH_ACK)
|
if (tiflags & TH_ACK) {
|
||||||
tp = tcp_drop(tp,0); /* XXX Check t_softerror! */
|
tcp_drop(tp, 0); /* XXX Check t_softerror! */
|
||||||
|
}
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -821,13 +822,13 @@ trimthenstep6:
|
||||||
case TCPS_FIN_WAIT_2:
|
case TCPS_FIN_WAIT_2:
|
||||||
case TCPS_CLOSE_WAIT:
|
case TCPS_CLOSE_WAIT:
|
||||||
tp->t_state = TCPS_CLOSED;
|
tp->t_state = TCPS_CLOSED;
|
||||||
tp = tcp_close(tp);
|
tcp_close(tp);
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
case TCPS_CLOSING:
|
case TCPS_CLOSING:
|
||||||
case TCPS_LAST_ACK:
|
case TCPS_LAST_ACK:
|
||||||
case TCPS_TIME_WAIT:
|
case TCPS_TIME_WAIT:
|
||||||
tp = tcp_close(tp);
|
tcp_close(tp);
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1074,7 +1075,7 @@ trimthenstep6:
|
||||||
*/
|
*/
|
||||||
case TCPS_LAST_ACK:
|
case TCPS_LAST_ACK:
|
||||||
if (ourfinisacked) {
|
if (ourfinisacked) {
|
||||||
tp = tcp_close(tp);
|
tcp_close(tp);
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1165,12 +1166,6 @@ dodata:
|
||||||
if ((ti->ti_len || (tiflags&TH_FIN)) &&
|
if ((ti->ti_len || (tiflags&TH_FIN)) &&
|
||||||
TCPS_HAVERCVDFIN(tp->t_state) == 0) {
|
TCPS_HAVERCVDFIN(tp->t_state) == 0) {
|
||||||
TCP_REASS(tp, ti, m, so, tiflags);
|
TCP_REASS(tp, ti, m, so, tiflags);
|
||||||
/*
|
|
||||||
* Note the amount of data that peer has sent into
|
|
||||||
* our window, in order to estimate the sender's
|
|
||||||
* buffer size.
|
|
||||||
*/
|
|
||||||
len = so->so_rcv.sb_datalen - (tp->rcv_adv - tp->rcv_nxt);
|
|
||||||
} else {
|
} else {
|
||||||
m_free(m);
|
m_free(m);
|
||||||
tiflags &= ~TH_FIN;
|
tiflags &= ~TH_FIN;
|
||||||
|
|
|
@ -161,7 +161,6 @@ static void tftp_send_error(struct tftp_session *spt,
|
||||||
struct sockaddr_in saddr, daddr;
|
struct sockaddr_in saddr, daddr;
|
||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
struct tftp_t *tp;
|
struct tftp_t *tp;
|
||||||
int nobytes;
|
|
||||||
|
|
||||||
m = m_get(spt->slirp);
|
m = m_get(spt->slirp);
|
||||||
|
|
||||||
|
@ -185,8 +184,6 @@ static void tftp_send_error(struct tftp_session *spt,
|
||||||
daddr.sin_addr = spt->client_ip;
|
daddr.sin_addr = spt->client_ip;
|
||||||
daddr.sin_port = spt->client_port;
|
daddr.sin_port = spt->client_port;
|
||||||
|
|
||||||
nobytes = 2;
|
|
||||||
|
|
||||||
m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) -
|
m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) -
|
||||||
sizeof(struct ip) - sizeof(struct udphdr);
|
sizeof(struct ip) - sizeof(struct udphdr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue