[Top] [All Lists]

Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@xxx

To: chas williams <chas@xxxxxxxxxxxxxxxx>
Subject: Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@xxxxxxxxxx)
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 22 Sep 2003 19:00:17 +0100
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <200309221755.h8MHt5kT010184@xxxxxxxxxxxxxxxxxxxxxxx>; from chas@xxxxxxxxxxxxxxxx on Mon, Sep 22, 2003 at 01:55:07PM -0400
References: <hch@xxxxxxxxxxxxx> <200309221755.h8MHt5kT010184@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/
On Mon, Sep 22, 2003 at 01:55:07PM -0400, chas williams wrote:
> In message <20030922180749.A26432@xxxxxxxxxxxxx>,Christoph Hellwig writes:
> >Umm, shouldn't you just ifdef out the whole function and it's
> >assignment to the operations vector?  This looks horribly ugly..
> i suppose i am not convinced that two #ifdef/#endif's are better than an
> #if/#else/#endif

first ifdefs in a function are always worse than around functions,
second ifdefs in a function that make it a stuv are pretty ugly and
third your (void)arg crap is ugly as hell. (what compiler do you have
that complains about this, btw, gcc 3.3 doesn't..).

So if you prefer one if/else/endif you can do it as

#if FOO
#define foo_ioctl       NULL

but in the case of assigning a function pointer to an operation vector
I find this more confusing than the above variant. 

---end quoted text---

<Prev in Thread] Current Thread [Next in Thread>