lkml.org 
[lkml]   [1999]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsmall question about isdn-code
while trying to solve a problem for a friend, i came across the following
code:

if ((card->typ > 0) && (card->typ < 31)) {
if (!((1 << card->typ) & SUPORTED_CARDS)) {
printk(KERN_WARNING
"HiSax: Support for %s Card not selected\n",
CardType[card->typ]);
restore_flags(flags);
return (0);
}
} else {
...

why do they do:
(1 << card->typ)

if they already checked if card->typ is between 0 and 31 ?

(i think i'm missing something here ;))

--
dag wieers, <dag@life.be>, http://dag.life.be/ _| _ _
for life is quite absurd, (_|(_|(_|
and death's the final word. -- Monty Python |


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.071 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site