test-util-sockets: Clean up SocketAddress construction
commit718a9be02df880ca4b4e34ce253daf2bfc5d059c
authorMarkus Armbruster <armbru@redhat.com>
Mon, 2 Nov 2020 09:44:14 +0000 (2 10:44 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 3 Nov 2020 13:09:28 +0000 (3 13:09 +0000)
tree658e57bf5e9851b9709c28eae921d1ee5f0d644e
parentd1a393211b5333f9374b439394424f594f69d282
test-util-sockets: Clean up SocketAddress construction

The thread functions build the SocketAddress from global variable
@abstract_sock_name and the tight flag passed as pointer
argument (either NULL or (gpointer)1).  There is no need for such
hackery; simply pass the SocketAddress instead.

While there, dumb down g_rand_int_range() to g_random_int().

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tests/test-util-sockets.c