* Add note explaining why you can't use OMPI_DEBUG_ZERO (which was my
first reaction when I saw the commit). Also, use ifconf.ifc_len instead of ifc_len. Shouldn't matter, but be careful. This commit was SVN r4989.
Этот коммит содержится в:
родитель
abd1048646
Коммит
3b9753079d
@ -126,8 +126,12 @@ static int ompi_ifinit(void)
|
|||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the memory so valgrind and purify won't complain */
|
/* initialize the memory so valgrind and purify won't complain
|
||||||
memset(ifconf.ifc_req, 0, ifc_len);
|
* can't use OMPI_DEBUG_ZERO because sizeof(ifconf.ifc_req)
|
||||||
|
* isn't userful. Since this isn't performance critical, just
|
||||||
|
* always memset.
|
||||||
|
*/
|
||||||
|
memset(ifconf.ifc_req, 0, ifconf.ifc_len);
|
||||||
|
|
||||||
if(ioctl(sd, SIOCGIFCONF, &ifconf) < 0) {
|
if(ioctl(sd, SIOCGIFCONF, &ifconf) < 0) {
|
||||||
/* if we got an einval, we probably don't have enough
|
/* if we got an einval, we probably don't have enough
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user