I can't speak for everyone, but splitting the clauses of an if statement
with ifdefs makes my eyes bleed.
I would personally prefer to see these replaced with a switch statment,
as used elsewhere in PF; however this would probably need a goto that
points to the end of the main switch() statment to avoid insanely
complex costructs. Wait, that already exists...
switch (pp->af) {
#ifdef INET
case AF_INET:
break;
#endif / * INET */
#idfed INET6
case AF_INET6:
break;
#endif /* INET6 */
default:
error = EAFNOSUPPORT;
goto fail;
}
On Sat, Oct 03, 2009 at 09:04:01PM +0400, Vadim Zhukov wrote: