diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-07 15:32:56 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-07 15:32:56 +0000 |
commit | 511d2b140f3ff2f80d14637cdc2f29743a2daa51 (patch) | |
tree | 6cf21d1c95846f1c86879c60dffbe6a3eaa8aa6d /slirp/ip_output.c | |
parent | The _exit syscall is used for both thread termination in NPTL applications, (diff) | |
download | qemu-kvm-511d2b140f3ff2f80d14637cdc2f29743a2daa51.tar.gz qemu-kvm-511d2b140f3ff2f80d14637cdc2f29743a2daa51.tar.bz2 qemu-kvm-511d2b140f3ff2f80d14637cdc2f29743a2daa51.zip |
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
Diffstat (limited to 'slirp/ip_output.c')
-rw-r--r-- | slirp/ip_output.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/slirp/ip_output.c b/slirp/ip_output.c index 9538db989..5bce52061 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 |