mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
tests: Minimize variable scope
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
efe6429910
commit
deceb1e09f
@ -55,13 +55,14 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6,
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < 50; i++) {
|
||||
int only = 1;
|
||||
if (*hasIPv4) {
|
||||
if ((s4 = socket(AF_INET, SOCK_STREAM, 0)) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (*hasIPv6) {
|
||||
int only = 1;
|
||||
|
||||
if ((s6 = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user