[ofa-general] [PATCH] ib-mgmt: fixup ibsendtrap for windows
Sean Hefty
sean.hefty at intel.com
Mon May 4 15:49:49 PDT 2009
Fix some typecast issues.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
infiniband-diags/src/ibsendtrap.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/infiniband-diags/src/ibsendtrap.c b/infiniband-diags/src/ibsendtrap.c
index 469bc39..7ad588e 100644
--- a/infiniband-diags/src/ibsendtrap.c
+++ b/infiniband-diags/src/ibsendtrap.c
@@ -66,10 +66,10 @@ static int get_node_type(ib_portid_t *port)
static void build_trap144(ib_mad_notice_attr_t * n, ib_portid_t *port)
{
n->generic_type = 0x80 | IB_NOTICE_TYPE_INFO;
- n->g_or_v.generic.prod_type_lsb = cl_hton16(get_node_type(port));
+ n->g_or_v.generic.prod_type_lsb = cl_hton16((uint16_t) get_node_type(port));
n->g_or_v.generic.trap_num = cl_hton16(144);
- n->issuer_lid = cl_hton16(port->lid);
- n->data_details.ntc_144.lid = cl_hton16(port->lid);
+ n->issuer_lid = cl_hton16((uint16_t) port->lid);
+ n->data_details.ntc_144.lid = n->issuer_lid;
n->data_details.ntc_144.local_changes =
TRAP_144_MASK_OTHER_LOCAL_CHANGES;
n->data_details.ntc_144.change_flgs =
@@ -79,10 +79,10 @@ static void build_trap144(ib_mad_notice_attr_t * n, ib_portid_t *port)
static void build_trap129(ib_mad_notice_attr_t * n, ib_portid_t *port)
{
n->generic_type = 0x80 | IB_NOTICE_TYPE_URGENT;
- n->g_or_v.generic.prod_type_lsb = cl_hton16(get_node_type(port));
+ n->g_or_v.generic.prod_type_lsb = cl_hton16((uint16_t) get_node_type(port));
n->g_or_v.generic.trap_num = cl_hton16(129);
- n->issuer_lid = cl_hton16(port->lid);
- n->data_details.ntc_129_131.lid = cl_hton16(port->lid);
+ n->issuer_lid = cl_hton16((uint16_t) port->lid);
+ n->data_details.ntc_129_131.lid = n->issuer_lid;
n->data_details.ntc_129_131.pad = 0;
n->data_details.ntc_129_131.port_num = (uint8_t) error_port;
}
More information about the general
mailing list