aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-03-07 13:45:37 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-03-07 13:45:37 +0000
commit6dbfff6e106ac2efb5d46b245dde5f3bb18d68b1 (patch)
tree7e47d61a9919361f410982c08c375bf37c88e2b1
parent57cb0c8c8f5872b4fd867962d3a865ebcf52b683 (diff)
downloadslirp-6dbfff6e106ac2efb5d46b245dde5f3bb18d68b1.zip
slirp-6dbfff6e106ac2efb5d46b245dde5f3bb18d68b1.tar.gz
slirp-6dbfff6e106ac2efb5d46b245dde5f3bb18d68b1.tar.bz2
slirp: remove dead increments, spotted by clang
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--bootp.c2
-rw-r--r--cksum.c2
-rw-r--r--tcp_subr.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/bootp.c b/bootp.c
index fe8f495..70b6e9c 100644
--- a/bootp.c
+++ b/bootp.c
@@ -296,7 +296,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++ =
+ *q =
RFC1533_END
;
diff --git a/cksum.c b/cksum.c
index ca3eb2b..e5f8c11 100644
--- a/cksum.c
+++ b/cksum.c
@@ -73,7 +73,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/tcp_subr.c b/tcp_subr.c
index a265b4c..9b10419 100644
--- a/tcp_subr.c
+++ b/tcp_subr.c
@@ -852,7 +852,7 @@ int 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;