tests: Avoid -Wcast-align warning
authorAnoop C S <anoopcs@redhat.com>
Wed, 29 Aug 2018 23:18:30 +0000 (04:48 +0530)
committerAndreas Schneider <asn@samba.org>
Tue, 23 Oct 2018 13:39:04 +0000 (15:39 +0200)
commit0983cd2fd88cf580f60fe0cf6b0ddcdfcd18d249
tree0a089c9815d2dfc152924c4303b97b9c5c63407e
parent3d340c30517b90853318fe60ec239bf2bf789931
tests: Avoid -Wcast-align warning

warning: cast from 'struct sockaddr *' to 'struct sockaddr_in *'
                increases required alignment from 2 to 4 [-Wcast-align]
        struct sockaddr_in *sinp = (struct sockaddr_in *)to; ^~~~~~~~~~~~~~~~~~~~~~~~

Above warning can be avoided by making use of sockaddr_in available
within torture_address from the caller of echo_udp_recv_from_to().
Following that sa_socklen from torture_address can be used instead of
passing sa_socklen explicitly to echo_udp_recv_from_to().

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
tests/echo_srv.c