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 | 3acccfc67d3aa4611142e2171337c7c494b52efb (patch) | |
tree | b08c98364394eb863a23cd12a09ee7fd92ac14ea | |
parent | 5a82362ad0bf06bba3377d63ca0ecd05fb74f322 (diff) | |
download | qemu-3acccfc67d3aa4611142e2171337c7c494b52efb.zip qemu-3acccfc67d3aa4611142e2171337c7c494b52efb.tar.gz qemu-3acccfc67d3aa4611142e2171337c7c494b52efb.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-- | slirp/ip_icmp.c | 6 | ||||
-rw-r--r-- | slirp/ip_input.c | 8 | ||||
-rw-r--r-- | slirp/ip_output.c | 4 | ||||
-rw-r--r-- | slirp/mbuf.h | 3 | ||||
-rw-r--r-- | slirp/tcp_input.c | 10 | ||||
-rw-r--r-- | slirp/tcp_subr.c | 2 | ||||
-rw-r--r-- | slirp/udp.c | 2 |
7 files changed, 16 insertions, 19 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 0cd129c..4f10826 100644 --- a/slirp/ip_icmp.c +++ b/slirp/ip_icmp.c @@ -81,7 +81,7 @@ 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; } @@ -155,11 +155,11 @@ 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: diff --git a/slirp/ip_input.c b/slirp/ip_input.c index 2ff6adb..46c60b0 100644 --- a/slirp/ip_input.c +++ b/slirp/ip_input.c @@ -204,7 +204,7 @@ ip_input(struct mbuf *m) } return; bad: - m_freem(m); + m_free(m); return; } @@ -297,7 +297,7 @@ 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); } @@ -363,7 +363,7 @@ insert: return ip; dropfrag: - m_freem(m); + m_free(m); return NULL; } @@ -379,7 +379,7 @@ ip_freef(Slirp *slirp, struct ipq *fp) for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; 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/slirp/ip_output.c b/slirp/ip_output.c index 542f318..c82830f 100644 --- a/slirp/ip_output.c +++ b/slirp/ip_output.c @@ -159,7 +159,7 @@ sendorfree: if (error == 0) if_output(so, m); else - m_freem(m); + m_free(m); } } @@ -167,6 +167,6 @@ done: return (error); bad: - m_freem(m0); + m_free(m0); goto done; } diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 97729e2..b74544b 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -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/slirp/tcp_input.c b/slirp/tcp_input.c index e4a7731..c1214c0 100644 --- a/slirp/tcp_input.c +++ b/slirp/tcp_input.c @@ -136,7 +136,7 @@ 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. @@ -170,7 +170,7 @@ 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); } /* @@ -197,7 +197,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)) sbappend(so, m); @@ -451,7 +451,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 @@ -1260,7 +1260,7 @@ dropafterack: */ if (tiflags & TH_RST) goto drop; - m_freem(m); + m_free(m); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); return; diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index b661d26..61079b1 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -250,7 +250,7 @@ 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; diff --git a/slirp/udp.c b/slirp/udp.c index cefd50b..5b060f3 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -222,7 +222,7 @@ udp_input(register struct mbuf *m, int iphlen) return; bad: - m_freem(m); + m_free(m); return; } |