From 511d2b140f3ff2f80d14637cdc2f29743a2daa51 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Sat, 7 Mar 2009 15:32:56 +0000 Subject: Sparse fixes: NULL use, header order, ANSI prototypes, static Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162 --- slirp/ip_output.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'slirp/ip_output.c') diff --git a/slirp/ip_output.c b/slirp/ip_output.c index 9538db9895..5bce520612 100644 --- a/slirp/ip_output.c +++ b/slirp/ip_output.c @@ -53,9 +53,7 @@ u_int16_t ip_id; * The mbuf opt, if present, will not be freed. */ int -ip_output(so, m0) - struct socket *so; - struct mbuf *m0; +ip_output(struct socket *so, struct mbuf *m0) { register struct ip *ip; register struct mbuf *m = m0; @@ -135,7 +133,7 @@ ip_output(so, m0) for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len) { register struct ip *mhip; m = m_get(); - if (m == 0) { + if (m == NULL) { error = -1; STAT(ipstat.ips_odropped++); goto sendorfree; @@ -185,7 +183,7 @@ ip_output(so, m0) sendorfree: for (m = m0; m; m = m0) { m0 = m->m_nextpkt; - m->m_nextpkt = 0; + m->m_nextpkt = NULL; if (error == 0) if_output(so, m); else -- cgit v1.2.3