Commit e4f6433d authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix valgrind assertions.

parent b0958ebe
...@@ -82,7 +82,7 @@ parse_packet(const unsigned char *from, struct network *net, ...@@ -82,7 +82,7 @@ parse_packet(const unsigned char *from, struct network *net,
net->ifname, format_address(from)); net->ifname, format_address(from));
} }
numpxroutes = 0; numpxroutes = 0;
VALGRIND_MAKE_MEM_UNDEFINED(pxroutes, sizeof(pxroutes)); VALGRIND_MAKE_MEM_UNDEFINED(&pxroutes, sizeof(pxroutes));
} }
if(message[0] == 0) { if(message[0] == 0) {
if(memcmp(message + 4, myid, 16) == 0) if(memcmp(message + 4, myid, 16) == 0)
...@@ -142,7 +142,7 @@ parse_packet(const unsigned char *from, struct network *net, ...@@ -142,7 +142,7 @@ parse_packet(const unsigned char *from, struct network *net,
message[1], (message[2] << 8 | message[3]), message[1], (message[2] << 8 | message[3]),
neigh, pxroutes, numpxroutes); neigh, pxroutes, numpxroutes);
numpxroutes = 0; numpxroutes = 0;
VALGRIND_MAKE_MEM_UNDEFINED(pxroutes, sizeof(pxroutes)); VALGRIND_MAKE_MEM_UNDEFINED(&pxroutes, sizeof(pxroutes));
} else if(message[0] == 3) { } else if(message[0] == 3) {
debugf("Received txcost from %s.\n", format_address(from)); debugf("Received txcost from %s.\n", format_address(from));
if(memcmp(myid, message + 4, 16) == 0 || if(memcmp(myid, message + 4, 16) == 0 ||
...@@ -445,9 +445,8 @@ flushupdates(void) ...@@ -445,9 +445,8 @@ flushupdates(void)
} }
} }
schedule_flush_now(net); schedule_flush_now(net);
VALGRIND_MAKE_MEM_UNDEFINED(buffered_updates, VALGRIND_MAKE_MEM_UNDEFINED(&buffered_updates,
MAX_BUFFERED_UPDATES * sizeof(buffered_updates));
sizeof(struct destination));
} }
update_flush_time.tv_sec = 0; update_flush_time.tv_sec = 0;
update_flush_time.tv_usec = 0; update_flush_time.tv_usec = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment