On Saturday 18 October 2008 16:53:57 Johannes Berg wrote: > > + return (mask >> (attr-1)) & 0x1; > > I think > > return mask & (1<<(attr-1)); > > would be easier to understand. I'm not sure if that would be correct. The returned type is bool, which is 8bit. mask is 32bit. So if attr is > 8 you end up with truncation, AFAICS. So it should be return !!(mask & (1<<(attr-1))); to explicitely convert the mask into a boolean with the LSB indicating the state. But the original contruct isn't that bad, either, IMO :) -- Greetings Michael. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html