diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-30 14:49:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-30 14:49:14 +0000 |
commit | 89394682eb6f7a8d4735225a6128b94598a59184 (patch) | |
tree | a0cf258932d9d27f6b41ddd557d33eb900b08e51 /src/util/crypto_crc.c | |
parent | 61b9d26410b5a220a2d07a28ede463d5595bf6f5 (diff) | |
download | gnunet-89394682eb6f7a8d4735225a6128b94598a59184.tar.gz gnunet-89394682eb6f7a8d4735225a6128b94598a59184.zip |
-be-fix
Diffstat (limited to 'src/util/crypto_crc.c')
-rw-r--r-- | src/util/crypto_crc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c index ea419bed8..8bccf6b69 100644 --- a/src/util/crypto_crc.c +++ b/src/util/crypto_crc.c | |||
@@ -129,10 +129,11 @@ GNUNET_CRYPTO_crc16_step (uint32_t sum, const void *buf, size_t len) | |||
129 | for (; len >= 2; len -= 2) | 129 | for (; len >= 2; len -= 2) |
130 | sum += *(hdr++); | 130 | sum += *(hdr++); |
131 | if (len == 1) | 131 | if (len == 1) |
132 | sum += *((unsigned char *) hdr) & ntohs(0xFF00); | 132 | sum += (*hdr) & ntohs(0xFF00); |
133 | return sum; | 133 | return sum; |
134 | } | 134 | } |
135 | 135 | ||
136 | |||
136 | /** | 137 | /** |
137 | * Convert results from GNUNET_CRYPTO_crc16_step to final crc16. | 138 | * Convert results from GNUNET_CRYPTO_crc16_step to final crc16. |
138 | * | 139 | * |