[openib-general] Re: [PATCH] sdp conditional code cleanup

Libor Michalek libor at topspin.com
Mon Feb 28 13:34:47 PST 2005


On Mon, Feb 28, 2005 at 01:27:46PM -0800, Johannes Erdfelt wrote:
> On Mon, Feb 28, 2005, Libor Michalek <libor at topspin.com> wrote:
> > @@ -1302,7 +1301,7 @@ static int _sdp_inet_shutdown(struct soc
> >          *       1 - send shutdown
> >          *       2 - send/recv shutdown.
> >          */
> > -       if (0 > flag || 2 < flag)
> > +       if (flag < 0 || flag < 2)
> >                 return -EINVAL;
> 
> Are you fixing or introducing a bug here? I'm guessing introducing since
> the first part of that statement is superfluous now :)

  The three patches I included in my response are the patches which I
fixed, I didn't include the fixes themselves since they're obvious.
In this case what I commited was:

+       if (flag < 0 || flag > 2)


-Libor




More information about the general mailing list