[openib-general] OpenSM: osm_sa_path_record.c minor code redundancy

Hal Rosenstock halr at voltaire.com
Wed Jan 19 08:09:44 PST 2005


Hi Eitan,

It looks to me like in osm_sa_path_record.c::__osm_pr_rcv_respond that
the second setting of NO RECORDS status is redundant as it is weeded out
earlier in that routine.

  if( num_rec == 0 )
  {
    osm_sa_send_error( p_rcv->p_resp, p_madw,
                       IB_SA_MAD_STATUS_NO_RECORDS );
    goto Exit;
  }
...
  if( num_rec == 0 )
  {
    p_resp_sa_mad->status = IB_SA_MAD_STATUS_NO_RECORDS;
    cl_memclr( p_resp_pr, sizeof(*p_resp_pr) );
  }
  else
  {
...

-- Hal




More information about the general mailing list