aboutsummaryrefslogtreecommitdiff
path: root/slirp
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
commit369c86e7889ef7f4c9902e25156d3193d4046a2a (patch)
tree581b4317462526ee2ec9342520cdd6bca7e0fccb /slirp
parentaca9fcd28e8a40f2555f8d6d113e4988335aa629 (diff)
slirp: remove dead increments, spotted by clang
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'slirp')
-rw-r--r--slirp/bootp.c2
-rw-r--r--slirp/cksum.c2
-rw-r--r--slirp/tcp_subr.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/slirp/bootp.c b/slirp/bootp.c
index 261762a260..3e4e8810be 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 34977ffc03..a044ec17cc 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 7851307fa0..0a370f101e 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;