* Herbert Poetzl <20050117090912.GB30371@xxxxxxxxxxxxxxxxx> 2005-01-17 10:09
> On Sun, Jan 16, 2005 at 12:40:56AM +0100, Thomas Graf wrote:
> > * Andrew Morton <20050115153202.2f7f81c6.akpm@xxxxxxxx> 2005-01-15 15:32
> > > An uglier but more efficient approach is to whack braces around the whole
> > > thing.
> >
> > Fine with me as well. The code isn't used that often and not deep in the
> > calling stack which is why I preferred the cleaner way first.
>
> hmm, please remind me why putting some
>
> #ifdef CONFIG_NET_CLS_ACT
> int err;
> struct tc_action *act;
> #endif
>
> at the _beginning_ of that procedure would
> be a bad choice?
I personally don't think it's a bad choice but the less ifdefs the
better. 2 out of 3 of my latest bugs were related to such ifdefs because
testing gets more error prone. Personally I think the cleanest way
would be to create inlined functions together with a nop macro but
it would hide the mutual exclusiveness of NET_CLS_ACT and NET_CLS_POLICE
in this case which is even worse.
|