aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-12-04 19:05:12 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2020-12-04 19:05:12 +0400
commit4c4e035813313d02b63fdeb920d56fb2fdc0a5b1 (patch)
treeef6222601dcae95a504c057f147846428baa3a69
parent07e8cfac69766081871ab620d9f16a630543d302 (diff)
downloadslirp-4c4e035813313d02b63fdeb920d56fb2fdc0a5b1.zip
slirp-4c4e035813313d02b63fdeb920d56fb2fdc0a5b1.tar.gz
slirp-4c4e035813313d02b63fdeb920d56fb2fdc0a5b1.tar.bz2
Remove some needless (void)casts
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--src/cksum.c2
-rw-r--r--src/ip_icmp.c4
-rw-r--r--src/ip_input.c4
-rw-r--r--src/sbuf.c2
-rw-r--r--src/tcp_input.c16
-rw-r--r--src/tcp_subr.c2
-rw-r--r--src/tcp_timer.c6
7 files changed, 18 insertions, 18 deletions
diff --git a/src/cksum.c b/src/cksum.c
index 4d08380..b1cb97b 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -47,7 +47,7 @@
{ \
l_util.l = sum; \
sum = l_util.s[0] + l_util.s[1]; \
- (void)ADDCARRY(sum); \
+ ADDCARRY(sum); \
}
int cksum(struct mbuf *m, int len)
diff --git a/src/ip_icmp.c b/src/ip_icmp.c
index f4d686b..78b73e1 100644
--- a/src/ip_icmp.c
+++ b/src/ip_icmp.c
@@ -389,7 +389,7 @@ void icmp_forward_error(struct mbuf *msrc, uint8_t type, uint8_t code, int minsi
ip->ip_dst = ip->ip_src; /* ip addresses */
ip->ip_src = *src;
- (void)ip_output((struct socket *)NULL, m);
+ ip_output((struct socket *)NULL, m);
end_error:
return;
@@ -449,7 +449,7 @@ void icmp_reflect(struct mbuf *m)
ip->ip_src = icmp_dst;
}
- (void)ip_output((struct socket *)NULL, m);
+ ip_output((struct socket *)NULL, m);
}
void icmp_receive(struct socket *so)
diff --git a/src/ip_input.c b/src/ip_input.c
index 7f017a2..f4fd85b 100644
--- a/src/ip_input.c
+++ b/src/ip_input.c
@@ -360,7 +360,7 @@ insert:
ip->ip_src = fp->ipq_src;
ip->ip_dst = fp->ipq_dst;
remque(&fp->ip_link);
- (void)m_free(dtom(slirp, fp));
+ m_free(dtom(slirp, fp));
m->m_len += (ip->ip_hl << 2);
m->m_data -= (ip->ip_hl << 2);
@@ -386,7 +386,7 @@ static void ip_freef(Slirp *slirp, struct ipq *fp)
m_free(dtom(slirp, q));
}
remque(&fp->ip_link);
- (void)m_free(dtom(slirp, fp));
+ m_free(dtom(slirp, fp));
}
/*
diff --git a/src/sbuf.c b/src/sbuf.c
index 2fb9176..b357091 100644
--- a/src/sbuf.c
+++ b/src/sbuf.c
@@ -68,7 +68,7 @@ void sbappend(struct socket *so, struct mbuf *m)
if (so->so_urgc) {
sbappendsb(&so->so_rcv, m);
m_free(m);
- (void)sosendoob(so);
+ sosendoob(so);
return;
}
diff --git a/src/tcp_input.c b/src/tcp_input.c
index d55b0c8..01e4c19 100644
--- a/src/tcp_input.c
+++ b/src/tcp_input.c
@@ -524,7 +524,7 @@ findso:
* we don't need this.. XXX???
*/
if (so->so_snd.sb_cc)
- (void)tcp_output(tp);
+ tcp_output(tp);
return;
}
@@ -775,7 +775,7 @@ findso:
soisfconnected(so);
tp->t_state = TCPS_ESTABLISHED;
- (void)tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0);
+ tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0);
/*
* if we didn't have to retransmit the SYN,
* use its rtt as our initial srtt & rtt var.
@@ -977,7 +977,7 @@ findso:
soisfconnected(so);
}
- (void)tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0);
+ tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0);
tp->snd_wl1 = ti->ti_seq - 1;
/* Avoid ack processing; snd_una==ti_ack => dup ack */
goto synrx_to_est;
@@ -1040,7 +1040,7 @@ findso:
tp->t_rtt = 0;
tp->snd_nxt = ti->ti_ack;
tp->snd_cwnd = tp->t_maxseg;
- (void)tcp_output(tp);
+ tcp_output(tp);
tp->snd_cwnd =
tp->snd_ssthresh + tp->t_maxseg * tp->t_dupacks;
if (SEQ_GT(onxt, tp->snd_nxt))
@@ -1048,7 +1048,7 @@ findso:
goto drop;
} else if (tp->t_dupacks > TCPREXMTTHRESH) {
tp->snd_cwnd += tp->t_maxseg;
- (void)tcp_output(tp);
+ tcp_output(tp);
goto drop;
}
} else
@@ -1332,7 +1332,7 @@ dodata:
* Return any desired output.
*/
if (needoutput || (tp->t_flags & TF_ACKNOW)) {
- (void)tcp_output(tp);
+ tcp_output(tp);
}
return;
@@ -1345,7 +1345,7 @@ dropafterack:
goto drop;
m_free(m);
tp->t_flags |= TF_ACKNOW;
- (void)tcp_output(tp);
+ tcp_output(tp);
return;
dropwithreset:
@@ -1399,7 +1399,7 @@ static void tcp_dooptions(struct tcpcb *tp, uint8_t *cp, int cnt,
continue;
memcpy((char *)&mss, (char *)cp + 2, sizeof(mss));
NTOHS(mss);
- (void)tcp_mss(tp, mss); /* sets t_maxseg */
+ tcp_mss(tp, mss); /* sets t_maxseg */
break;
}
}
diff --git a/src/tcp_subr.c b/src/tcp_subr.c
index a1016d9..ca1fad8 100644
--- a/src/tcp_subr.c
+++ b/src/tcp_subr.c
@@ -303,7 +303,7 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err)
if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_state = TCPS_CLOSED;
- (void)tcp_output(tp);
+ tcp_output(tp);
}
return (tcp_close(tp));
}
diff --git a/src/tcp_timer.c b/src/tcp_timer.c
index 102023e..bc4db2d 100644
--- a/src/tcp_timer.c
+++ b/src/tcp_timer.c
@@ -52,7 +52,7 @@ void tcp_fasttimo(Slirp *slirp)
(tp->t_flags & TF_DELACK)) {
tp->t_flags &= ~TF_DELACK;
tp->t_flags |= TF_ACKNOW;
- (void)tcp_output(tp);
+ tcp_output(tp);
}
}
@@ -233,7 +233,7 @@ static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer)
tp->snd_ssthresh = win * tp->t_maxseg;
tp->t_dupacks = 0;
}
- (void)tcp_output(tp);
+ tcp_output(tp);
break;
/*
@@ -243,7 +243,7 @@ static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer)
case TCPT_PERSIST:
tcp_setpersist(tp);
tp->t_force = 1;
- (void)tcp_output(tp);
+ tcp_output(tp);
tp->t_force = 0;
break;