0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Problem: test_router_mandatory_hwm uses unitialised memory

Solution: memset temporary buffer before use to reduce Valgrind noise
This commit is contained in:
Luca Boccassi 2016-02-05 14:41:03 +00:00
parent cffc653535
commit f87888f80c

View File

@ -83,6 +83,7 @@ int main (void)
int i; int i;
const int BUF_SIZE = 65536; const int BUF_SIZE = 65536;
char buf[BUF_SIZE]; char buf[BUF_SIZE];
memset(buf, 0, BUF_SIZE);
// Send first batch of messages // Send first batch of messages
for(i = 0; i < 100000; ++i) { for(i = 0; i < 100000; ++i) {
if (TRACE_ENABLED) fprintf(stderr, "Sending message %d ...\n", i); if (TRACE_ENABLED) fprintf(stderr, "Sending message %d ...\n", i);