summaryrefslogtreecommitdiff
path: root/checksum.c
diff options
context:
space:
mode:
authorMichael Richardson <mcr@sandelman.ca>2014-01-01 21:27:54 -0500
committerMichael Richardson <mcr@sandelman.ca>2014-01-01 21:31:18 -0500
commita97fb2f3ae9731dd13e6854742c090ca9ef454cf (patch)
treef0eecb0f7bbc0d6f32f9ef310bdd19cab32d1345 /checksum.c
parent35c5cd9911f3fcc385e4a04c31016c253ee7a426 (diff)
downloadtcpdump-a97fb2f3ae9731dd13e6854742c090ca9ef454cf.tar.gz
whitespace changes
Diffstat (limited to 'checksum.c')
-rw-r--r--checksum.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/checksum.c b/checksum.c
index 57c02bd1..76e2ea07 100644
--- a/checksum.c
+++ b/checksum.c
@@ -93,12 +93,12 @@ static const u_int16_t crc10_table[256] =
static void
init_crc10_table(void)
-{
+{
#define CRC10_POLYNOMIAL 0x633
register int i, j;
register u_int16_t accum;
u_int16_t verify_crc10_table[256];
-
+
for ( i = 0; i < 256; i++ )
{
accum = ((unsigned short) i << 2);
@@ -166,14 +166,14 @@ create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
} else {
c0 = c0 + *(pptr++);
c1 += c0;
- }
+ }
}
c0 = c0 % 255;
c1 = c1 % 255;
mul = (length - checksum_offset)*(c0);
-
+
x = mul - c0 - c1;
y = c1 - mul - 1;
@@ -189,6 +189,6 @@ create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
y &= 0x00FF;
checksum = ((x << 8) | y);
-
+
return checksum;
}