This fixes two scan-build false positives:
context.c:441:23: warning: The left operand of '!=' is a garbage value
|| sin.sin_port != htons(lwres_udp_port))
~~~~~~~~~~~~ ^
context.c:447:25: warning: The left operand of '!=' is a garbage value
|| sin6.sin6_port != htons(lwres_udp_port))
~~~~~~~~~~~~~~ ^
2 warnings generated.
The sin and sin6 structures are used as argument to recvfrom call and
they are properly filled by the call.
int *recvd_len)
{
LWRES_SOCKADDR_LEN_T fromlen;
- struct sockaddr_in sin;
- struct sockaddr_in6 sin6;
+ struct sockaddr_in sin = { .sin_port = 0 };
+ struct sockaddr_in6 sin6 = { .sin6_port = 0 };
struct sockaddr *sa;
int ret;