| To: | chas williams <chas@xxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com) |
| 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@ginger.cmf.nrl.navy.mil>; from chas@cmf.nrl.navy.mil on Mon, Sep 22, 2003 at 01:55:07PM -0400 |
| References: | <hch@infradead.org> <200309221755.h8MHt5kT010184@ginger.cmf.nrl.navy.mil> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.2.5.1i |
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
foo_ioctl()
{
}
#else
#define foo_ioctl NULL
#endif
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> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com), chas williams |
|---|---|
| Next by Date: | Re: [PATCH] (3/6) ipvs -- use list_for_each_entry macro's, Stephen Hemminger |
| Previous by Thread: | Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com), chas williams |
| Next by Thread: | Re: [PATCH][ATM]: [lanai] ioctl only meant for debugging (from mitch@sfgoth.com), Mitchell Blank Jr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |