/*
* This routine writes each crc_table entry exactly once,
- * with the ccorrect final value. Thus, it is safe to call
+ * with the correct final value. Thus, it is safe to call
* even on a table that someone else is using concurrently.
*/
static void
for (; len >= 2; len -= 2)
sum += *(hdr++);
if (len == 1)
- sum += *((unsigned char *) hdr);
+ sum += (*hdr) & ntohs(0xFF00);
return sum;
}
+
/**
* Convert results from GNUNET_CRYPTO_crc16_step to final crc16.
*