summaryrefslogtreecommitdiff
path: root/slirp/cksum.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/cksum.c')
-rw-r--r--slirp/cksum.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/slirp/cksum.c b/slirp/cksum.c
index f8f7512b6b..ee7e8644ad 100644
--- a/slirp/cksum.c
+++ b/slirp/cksum.c
@@ -41,7 +41,7 @@
*
* This routine is very heavily used in the network
* code and should be modified for each CPU to be as fast as possible.
- *
+ *
* XXX Since we will never span more than 1 mbuf, we can optimise this
*/
@@ -63,13 +63,13 @@ int cksum(struct mbuf *m, int len)
u_int16_t s[2];
u_int32_t l;
} l_util;
-
+
if (m->m_len == 0)
goto cont;
w = mtod(m, u_int16_t *);
-
+
mlen = m->m_len;
-
+
if (len < mlen)
mlen = len;
len -= mlen;
@@ -107,7 +107,7 @@ int cksum(struct mbuf *m, int len)
while ((mlen -= 2) >= 0) {
sum += *w++;
}
-
+
if (byte_swapped) {
REDUCE;
sum <<= 8;
@@ -117,11 +117,11 @@ int cksum(struct mbuf *m, int len)
sum += s_util.s;
mlen = 0;
} else
-
+
mlen = -1;
} else if (mlen == -1)
s_util.c[0] = *(u_int8_t *)w;
-
+
cont:
#ifdef DEBUG
if (len) {