projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3ba50e
)
Avoid void pointer arithmetic.
author
Guus Sliepen
<guus@tinc-vpn.org>
Wed, 17 Jul 2019 22:31:11 +0000
(
00:31
+0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Wed, 17 Jul 2019 22:31:11 +0000
(
00:31
+0200)
src/route.c
patch
|
blob
|
history
diff --git
a/src/route.c
b/src/route.c
index
2fa6175
..
d1048e7
100644
(file)
--- a/
src/route.c
+++ b/
src/route.c
@@
-63,7
+63,8
@@
static timeout_t age_subnets_timeout;
/* RFC 1071 */
-static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) {
+static uint16_t inet_checksum(void *vdata, int len, uint16_t prevsum) {
+ uint8_t *data = vdata;
uint16_t word;
uint32_t checksum = prevsum ^ 0xFFFF;
@@
-75,7
+76,7
@@
static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) {
}
if(len) {
- checksum += *
(uint8_t *)
data;
+ checksum += *data;
}
while(checksum >> 16) {