infiniband-diags/ibportstate.c: Fix sizeof
PATCH 1/1 infiniband-diags/ibportstate.c: Fix sizeof
It shouldn't be sizeof the pointer but this doesn't affect execution since this parameter is not used by mad_dump_portstates
---
src/ibportstate.c +1 -1
@@ -126,7 +126,7 @@ static void show_port_info(ib_portid_t * dest, uint8_t * data, int portnum)char buf[2048 ];char val[64 ]; -mad_dump_portstates (buf,sizeof buf, data,sizeof data); +mad_dump_portstates (buf,sizeof buf, data,sizeof *data);mad_decode_field (data,IB_PORT_LID_F , val);mad_dump_field (IB_PORT_LID_F , buf +strlen (buf),sizeof buf -strlen (buf), val);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Ira Weiny
AppliedQuoted 5 lines · On Wed, 8 Jun 2011 05:57:55 -0700 Hal Rosenstock…
It shouldn't be sizeof the pointer but this doesn't affect execution since this parameter is not used by
mad_dump_portstates
Thanks applied,
Ira
Quoted 14 lines
---
src/ibportstate.c +1
-1@@ -126,7 +126,7 @@ static void show_port_info(ib_portid_t * dest, uint8_t * data, int portnum)char buf[2048 ];char val[64 ]; -mad_dump_portstates (buf,sizeof buf, data,sizeof data); +mad_dump_portstates (buf,sizeof buf, data,sizeof *data);mad_decode_field (data,IB_PORT_LID_F , val);mad_dump_field (IB_PORT_LID_F , buf +strlen (buf),sizeof buf -strlen (buf), val);
Signature · 9 lines
Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html