mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +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;
|
return -1;
|
||||||
|
|
||||||
for (i = 0; i < 50; i++) {
|
for (i = 0; i < 50; i++) {
|
||||||
int only = 1;
|
|
||||||
if (*hasIPv4) {
|
if (*hasIPv4) {
|
||||||
if ((s4 = socket(AF_INET, SOCK_STREAM, 0)) < 0)
|
if ((s4 = socket(AF_INET, SOCK_STREAM, 0)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*hasIPv6) {
|
if (*hasIPv6) {
|
||||||
|
int only = 1;
|
||||||
|
|
||||||
if ((s6 = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
|
if ((s6 = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user