projects
/
oweals
/
tinc.git
/ 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 2fa6175142ab3de69f3684e9102bb55db59d5ec6..d1048e76dc7c4890ad23c08a4e68048c6d7106a6 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) {