On Wed, 1 Jun 2011 06:45:57 -0700 Hal Rosenstock <h...@dev.mellanox.co.il> wrote:
> > Signed-off-by: Hal Rosenstock <h...@mellanox.com> Thanks, applied, Ira > --- > diff --git a/src/register.c b/src/register.c > index 0ff8006..1fdb64a 100644 > --- a/src/register.c > +++ b/src/register.c > @@ -77,7 +77,7 @@ static int mgmt_class_vers(int mgmt_class) > > int mad_class_agent(int mgmt) > { > - if (mgmt < 1 || mgmt > MAX_CLASS) > + if (mgmt < 1 || mgmt >= MAX_CLASS) > return -1; > return ibmp->class_agents[mgmt]; > } > diff --git a/src/rpc.c b/src/rpc.c > index 88e43e7..d20c321 100644 > --- a/src/rpc.c > +++ b/src/rpc.c > @@ -120,7 +120,7 @@ int mad_rpc_portid(struct ibmad_port *srcport) > > int mad_rpc_class_agent(struct ibmad_port *port, int class) > { > - if (class < 1 || class > MAX_CLASS) > + if (class < 1 || class >= MAX_CLASS) > return -1; > return port->class_agents[class]; > } -- Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 wei...@llnl.gov -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html