Commit 8377e8b7 authored by Pekka Pessi's avatar Pekka Pessi

tport_type_udp.c: tport_check_trunc() cleaned code

Ignore-this: b39558360afb657325a4615d0919baaa

Coverity issue.

darcs-hash:20090512180433-db55f-7136738d621cc636ecd076344064128337c14933.gz
parent 32cf6604
......@@ -254,19 +254,15 @@ static void tport_check_trunc(tport_t *tp, su_addrinfo_t *ai)
if (n != 4)
return;
for (;;) {
n = su_recvfrom(tp->tp_socket, buffer, sizeof buffer, MSG_TRUNC,
(void *)&su, &sulen);
if (n > (ssize_t)sizeof buffer) {
tp->tp_trunc = 1;
return;
}
/* XXX - check that su and tp->tp_addrinfo->ai_addr match */
n = su_recvfrom(tp->tp_socket, buffer, sizeof buffer, MSG_TRUNC,
(void *)&su, &sulen);
if (n > (ssize_t)sizeof buffer) {
tp->tp_trunc = 1;
return;
}
/* XXX - check that su and tp->tp_addrinfo->ai_addr match */
#endif
}
......
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