Skip to content

Commit 934289b

Browse files
bosilcadevreal
andauthored
Apply suggestions from code review
Co-authored-by: Joseph Schuchart <[email protected]> Signed-off-by: bosilca <[email protected]>
1 parent 5e5db44 commit 934289b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ static void mca_btl_tcp_component_recv_handler(int sd, short flags, void *user)
15121512
* but that interface is only local, and we received our own message.
15131513
* If we just close the socket this will confuse the connection, as
15141514
* it will not be able to know that the interface should not be
1515-
* used. Instead, we cabn identify ourselves by sending our guid
1515+
* used. Instead, we can identify ourselves by sending our guid
15161516
* back to ourselves, marking the interface as improper for future
15171517
* communications.
15181518
*/

opal/mca/btl/tcp/btl_tcp_proc.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,8 @@ mca_btl_tcp_proc_t *mca_btl_tcp_proc_create(opal_proc_t *proc)
410410
}
411411

412412
/**
413-
* If the peer is physically located on another node, remove allinterfaces
414-
* that have the an IP address identical to any local interface (this will
413+
* If the peer is physically located on another node, remove all interfaces
414+
* that have an IP address identical to any local interface (this will
415415
* remove all the local and virtual interfaces).
416416
*/
417417
size_t count = size / sizeof(mca_btl_tcp_modex_addr_t);
@@ -423,9 +423,9 @@ mca_btl_tcp_proc_t *mca_btl_tcp_proc_create(opal_proc_t *proc)
423423
OPAL_LIST_FOREACH (local_iter, local_ifs, opal_if_t) {
424424
if (MCA_BTL_TCP_AF_INET == remote_addrs[i].addr_family &&
425425
AF_INET == local_iter->af_family) {
426-
if (!memcmp(&((struct sockaddr_in *)&local_iter->if_addr)->sin_addr,
427-
remote_addrs[i].addr,
428-
sizeof(struct in_addr))) {
426+
if (0 == memcmp(&((struct sockaddr_in *)&local_iter->if_addr)->sin_addr,
427+
remote_addrs[i].addr,
428+
sizeof(struct in_addr))) {
429429
/* we found a match */
430430
inet_ntop(AF_INET, remote_addrs[i].addr, tmp[0], 16);
431431
inet_ntop(AF_INET, &((struct sockaddr_in *) &local_iter->if_addr)->sin_addr,
@@ -436,9 +436,9 @@ mca_btl_tcp_proc_t *mca_btl_tcp_proc_create(opal_proc_t *proc)
436436
#if OPAL_ENABLE_IPV6
437437
else if (MCA_BTL_TCP_AF_INET6 == remote_addrs[i].addr_family &&
438438
AF_INET6 == local_iter->af_family) {
439-
if (!memcmp(&((struct sockaddr_in6 *) &local_iter->if_addr)->sin6_addr,
440-
remote_addrs[i].addr,
441-
sizeof(struct in6_addr))) {
439+
if (0 == memcmp(&((struct sockaddr_in6 *) &local_iter->if_addr)->sin6_addr,
440+
remote_addrs[i].addr,
441+
sizeof(struct in6_addr))) {
442442
/* we found a match */
443443
inet_ntop(AF_INET6, remote_addrs[i].addr, tmp[0], 16);
444444
inet_ntop(AF_INET6, &((struct sockaddr_in6 *) &local_iter->if_addr)->sin6_addr,

0 commit comments

Comments
 (0)