From: Blue Swirl Date: Sun, 7 Mar 2010 13:45:37 +0000 (+0000) Subject: slirp: remove dead increments, spotted by clang X-Git-Tag: v0.13.0-rc0~1179 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=369c86e7889ef7f4c9902e25156d3193d4046a2a;p=thirdparty%2Fqemu.git slirp: remove dead increments, spotted by clang Value stored is never read. Signed-off-by: Blue Swirl --- diff --git a/slirp/bootp.c b/slirp/bootp.c index 261762a2601..3e4e8810be3 100644 --- a/slirp/bootp.c +++ b/slirp/bootp.c @@ -293,7 +293,7 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp) memcpy(q, nak_msg, sizeof(nak_msg) - 1); q += sizeof(nak_msg) - 1; } - *q++ = RFC1533_END; + *q = RFC1533_END; daddr.sin_addr.s_addr = 0xffffffffu; diff --git a/slirp/cksum.c b/slirp/cksum.c index 34977ffc031..a044ec17ccb 100644 --- a/slirp/cksum.c +++ b/slirp/cksum.c @@ -68,7 +68,9 @@ int cksum(struct mbuf *m, int len) if (len < mlen) mlen = len; +#ifdef DEBUG len -= mlen; +#endif /* * Force to even boundary. */ diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 7851307fa06..0a370f101ec 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -857,7 +857,7 @@ tcp_emu(struct socket *so, struct mbuf *m) if (p == 7071) p = 0; *(u_char *)bptr++ = (p >> 8) & 0xff; - *(u_char *)bptr++ = p & 0xff; + *(u_char *)bptr = p & 0xff; ra = 0; return 1; /* port redirected, we're done */ break;