Skip to content

Commit

Permalink
Skip null ports
Browse files Browse the repository at this point in the history
  • Loading branch information
dswarbrick committed May 11, 2020
1 parent 1c43034 commit 6e0c464
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infiniband/netdiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ func (n *ibndNode) walkPorts(mad_port *C.struct_ibmad_port, resetThreshold uint)

// Get pointer to port struct at portNum array offset
pp := *(**C.ibnd_port_t)(unsafe.Pointer(arrayPtr + unsafe.Sizeof(arrayPtr)*uintptr(portNum)))
if pp == nil {
continue
}

myPort := Port{GUID: uint64(pp.guid)}

Expand Down

0 comments on commit 6e0c464

Please sign in to comment.