diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-20 12:20:16 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-23 10:19:49 -0500 |
commit | b0f74a483d5ca50dda42959133a34f1ca72deaa3 (patch) | |
tree | 7f75740f706baab50cc8c76f01cfa1351392d709 | |
parent | e754e7479659c0488e5c1afbafaf458a02275dc1 (diff) | |
download | slirp-b0f74a483d5ca50dda42959133a34f1ca72deaa3.zip slirp-b0f74a483d5ca50dda42959133a34f1ca72deaa3.tar.gz slirp-b0f74a483d5ca50dda42959133a34f1ca72deaa3.tar.bz2 |
slirp: Replace m_freem with m_free
Remove this pointless wrapping.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | ip_icmp.c | 6 | ||||
-rw-r--r-- | ip_input.c | 8 | ||||
-rw-r--r-- | ip_output.c | 4 | ||||
-rw-r--r-- | mbuf.h | 3 | ||||
-rw-r--r-- | tcp_input.c | 10 | ||||
-rw-r--r-- | tcp_subr.c | 2 | ||||
-rw-r--r-- | udp.c | 2 |
7 files changed, 16 insertions, 19 deletions
@@ -82,7 +82,7 @@ void icmp_input(struct mbuf *m, int hlen) */ if (icmplen < ICMP_MINLEN) { /* min 8 bytes payload */ freeit: - m_freem(m); + m_free(m); goto end_error; } @@ -158,11 +158,11 @@ void icmp_input(struct mbuf *m, int hlen) case ICMP_TSTAMP: case ICMP_MASKREQ: case ICMP_REDIRECT: - m_freem(m); + m_free(m); break; default: - m_freem(m); + m_free(m); } /* swith */ end_error: @@ -200,7 +200,7 @@ void ip_input(struct mbuf *m) } return; bad: - m_freem(m); + m_free(m); return; } @@ -292,7 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp) break; } q = q->ipf_next; - m_freem(dtom(slirp, q->ipf_prev)); + m_free(dtom(slirp, q->ipf_prev)); ip_deq(q->ipf_prev); } @@ -358,7 +358,7 @@ insert: return ip; dropfrag: - m_freem(m); + m_free(m); return NULL; } @@ -374,7 +374,7 @@ static void ip_freef(Slirp *slirp, struct ipq *fp) q = p) { p = q->ipf_next; ip_deq(q); - m_freem(dtom(slirp, q)); + m_free(dtom(slirp, q)); } remque(&fp->ip_link); (void)m_free(dtom(slirp, fp)); diff --git a/ip_output.c b/ip_output.c index 64f0d9a..10348b6 100644 --- a/ip_output.c +++ b/ip_output.c @@ -158,7 +158,7 @@ int ip_output(struct socket *so, struct mbuf *m0) if (error == 0) if_output(so, m); else - m_freem(m); + m_free(m); } } @@ -166,6 +166,6 @@ done: return (error); bad: - m_freem(m0); + m_free(m0); goto done; } @@ -33,9 +33,6 @@ #ifndef _MBUF_H_ #define _MBUF_H_ -#define m_freem m_free - - #define MINCSIZE 4096 /* Amount to increase mbuf if too small */ /* diff --git a/tcp_input.c b/tcp_input.c index b63c28a..1813114 100644 --- a/tcp_input.c +++ b/tcp_input.c @@ -137,7 +137,7 @@ static int tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, i = q->ti_seq + q->ti_len - ti->ti_seq; if (i > 0) { if (i >= ti->ti_len) { - m_freem(m); + m_free(m); /* * Try to present any queued data * at the left window edge to the user. @@ -171,7 +171,7 @@ static int tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, q = tcpiphdr_next(q); m = tcpiphdr_prev(q)->ti_mbuf; remque(tcpiphdr2qlink(tcpiphdr_prev(q))); - m_freem(m); + m_free(m); } /* @@ -198,7 +198,7 @@ present: m = ti->ti_mbuf; ti = tcpiphdr_next(ti); if (so->so_state & SS_FCANTSENDMORE) - m_freem(m); + m_free(m); else { if (so->so_emu) { if (tcp_emu(so, m)) @@ -449,7 +449,7 @@ findso: acked = ti->ti_ack - tp->snd_una; sbdrop(&so->so_snd, acked); tp->snd_una = ti->ti_ack; - m_freem(m); + m_free(m); /* * If all outstanding data are acked, stop @@ -1253,7 +1253,7 @@ dropafterack: */ if (tiflags & TH_RST) goto drop; - m_freem(m); + m_free(m); tp->t_flags |= TF_ACKNOW; (void)tcp_output(tp); return; @@ -251,7 +251,7 @@ struct tcpcb *tcp_close(struct tcpcb *tp) t = tcpiphdr_next(t); m = tcpiphdr_prev(t)->ti_mbuf; remque(tcpiphdr2qlink(tcpiphdr_prev(t))); - m_freem(m); + m_free(m); } free(tp); so->so_tcpcb = NULL; @@ -219,7 +219,7 @@ void udp_input(register struct mbuf *m, int iphlen) return; bad: - m_freem(m); + m_free(m); return; } |