[ofa-general] Re: [PATCH] ib-mgmt: fixup ibsendtrap for windows

Sasha Khapyorsky sashak at voltaire.com
Wed May 6 03:24:38 PDT 2009


On 15:49 Mon 04 May     , Sean Hefty wrote:
> Fix some typecast issues.
> 
> Signed-off-by: Sean Hefty <sean.hefty at intel.com>

Applied with change noted below. Thanks.

> ---
> 
>  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));

Instead of this casting I converted get_node_type() to return uint16_t.

Sasha



More information about the general mailing list