Re: Linux 2.4.7-ac9 (breaks ATM connect)

Chris Friesen (cfriesen@nortelnetworks.com)
Thu, 09 Aug 2001 16:52:49 -0400


"David S. Miller" wrote:
>
> Sampsa Ranta writes:
> > Pardon me, bugs come in too easy..
> >
> > - vci != ATM_VCI_ANY && vci >> dev->ci_range.vci_bits))
> > + vci != ATM_VCI_ANY && vci >= 1 << dev->ci_range.vci_bits))
> >
>
> This is rediculious, why has this expression changed when right
> above it is the same thing:
>
> vpi >> dev->ci_range.vpi_bits) || (vci != ATM_VCI_UNSPEC &&
>
> Shouldn't we be changing that "vpi >> dev->ci_range.vpi_bits" boolean
> test as well?

Am I missing something? As long as vci is unsigned isn't (vci >>
dev->ci_range.vci_bits) as a boolean value exactly the same thing as (vci >= 1
<< dev->ci_range.vci_bits) ?

As an example, take vci = 10001b and dev->ci_range.vci_bits = 4. The answer
works out the same either way.

Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/