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
diff --git a/slirp/ip_output.c b/slirp/ip_output.c
index 9538db9..5bce520 100644
--- a/slirp/ip_output.c
+++ b/slirp/ip_output.c
@@ -53,9 +53,7 @@
* 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 @@
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 @@
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