Commit 734ea79e authored by Pekka Pessi's avatar Pekka Pessi

test_nta.c: fixed memset() usage. MSG_TRUNC.

darcs-hash:20080123182239-65a35-41c40887fa0f1346e94b504ea95139e21c0da480.gz
parent 506193c8
......@@ -2256,11 +2256,15 @@ int test_dialog(agent_t *ag)
END();
}
#ifndef MSG_TRUNC
#define MSG_TRUNC 0
#endif
static ssize_t recv_udp(agent_t *ag, void *b, size_t size)
{
ssize_t n;
memset(b, size, 0);
memset(b, 0, size);
for (;;) {
su_root_step(ag->ag_root, 10L);
......@@ -2305,10 +2309,6 @@ int test_merging(agent_t *ag)
su_sockaddr_t *su = ag->ag_su_nta;
socklen_t sulen = ag->ag_su_nta_len;
#ifndef MSG_TRUNC
#define MSG_TRUNC 0
#endif
/* Empty sink socket */
su_setblocking(ag->ag_sink_socket, 0);
while (su_recv(ag->ag_sink_socket, m1, sizeof m1, MSG_TRUNC) >= 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