Skip to content

Commit

Permalink
ibdiags/ibtracert: Remove srcport parameter
Browse files Browse the repository at this point in the history
All callers pass this as NULL, remove it and just use NULL instead. Avoids
shadowing a global.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
jgunthorpe committed Mar 8, 2019
1 parent 78ce6b0 commit 11edb99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ibtracert.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,12 +740,12 @@ static void dump_mcpath(Node * node, int dumplevel)
free(nodename);
}

static int resolve_lid(ib_portid_t * portid, const void *srcport)
static int resolve_lid(ib_portid_t *portid)
{
uint8_t portinfo[64] = { 0 };
uint16_t lid;

if (!smp_query_via(portinfo, portid, IB_ATTR_PORT_INFO, 0, 0, srcport))
if (!smp_query_via(portinfo, portid, IB_ATTR_PORT_INFO, 0, 0, NULL))
return -1;
mad_decode_field(portinfo, IB_PORT_LID_F, &lid);

Expand Down Expand Up @@ -804,12 +804,12 @@ static int get_route(char *srcid, char *dstid) {
}

if (ibd_dest_type == IB_DEST_DRPATH) {
if (resolve_lid(&src_portid, NULL) < 0) {
if (resolve_lid(&src_portid) < 0) {
IBWARN("cannot resolve lid for port \'%s\'",
portid2str(&src_portid));
return -1;
}
if (resolve_lid(&dest_portid, NULL) < 0) {
if (resolve_lid(&dest_portid) < 0) {
IBWARN("cannot resolve lid for port \'%s\'",
portid2str(&dest_portid));
return -1;
Expand Down

0 comments on commit 11edb99

Please sign in to comment.