Cosmetics for r17150. Closes trac:1201
This commit was SVN r17151. The following SVN revision numbers were found above: r17150 --> open-mpi/ompi@4b50f02126 The following Trac tickets were found above: Ticket 1201 --> https://svn.open-mpi.org/trac/ompi/ticket/1201
Этот коммит содержится в:
родитель
4b50f02126
Коммит
601fb4389d
@ -919,7 +919,7 @@ int opal_ifaddrtoname(const char* if_addr, char* if_name, int length)
|
|||||||
int rc;
|
int rc;
|
||||||
#if OPAL_WANT_IPV6
|
#if OPAL_WANT_IPV6
|
||||||
int error;
|
int error;
|
||||||
struct addrinfo hints, *res, *r;
|
struct addrinfo hints, *res = NULL, *r;
|
||||||
#else
|
#else
|
||||||
#ifndef __WINDOWS__
|
#ifndef __WINDOWS__
|
||||||
in_addr_t inaddr;
|
in_addr_t inaddr;
|
||||||
@ -938,7 +938,6 @@ int opal_ifaddrtoname(const char* if_addr, char* if_name, int length)
|
|||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_family = PF_UNSPEC;
|
hints.ai_family = PF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
res = NULL;
|
|
||||||
error = getaddrinfo(if_addr, NULL, &hints, &res);
|
error = getaddrinfo(if_addr, NULL, &hints, &res);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -972,8 +971,10 @@ int opal_ifaddrtoname(const char* if_addr, char* if_name, int length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
freeaddrinfo (res);
|
if (NULL != res) {
|
||||||
|
freeaddrinfo (res);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
inaddr = inet_addr(if_addr);
|
inaddr = inet_addr(if_addr);
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user