[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1294155129.6617.37.camel@Joe-Laptop>
Date: Tue, 04 Jan 2011 07:32:09 -0800
From: Joe Perches <joe@...ches.com>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Changli Gao <xiaosuo@...il.com>, Joel Sing <jsing@...gle.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH] ipv4/route.c: respect prefsrc for local routes
On Tue, 2011-01-04 at 14:16 +0000, Ben Hutchings wrote:
> On Tue, 2011-01-04 at 09:38 +0100, Eric Dumazet wrote:
> > Le mardi 04 janvier 2011 à 16:07 +0800, Changli Gao a écrit :
> > > On Tue, Jan 4, 2011 at 3:33 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> > > > Le mardi 04 janvier 2011 à 08:24 +0100, Eric Dumazet a écrit :
> > > >> Please use FIB_RES_PREFSRC(res)
> > > > Hmm no, this is not applicable, but this could be shorter :
> > > > fl.fl4_src = res.fi->fib_prefsrc ? : fl.fl4_dst;
> > > I think Joe may object the use of "? :"
> > Ternary operator is standard C idiom, used in networking stuff, for
> > example in FIB_RES_PREFSRC() ;)
> However, the option to omit the second operand is a GNU extension.
I don't object to using GNU extensions.
The ?: extension is used in most every major subsystem.
$ grep -rP --include=*.[ch] "\?\s*:" * | wc -l
515
(with some false positives)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists