Re: [PATCH net-next] tcp: Fix tcp_syn_flood_action() if CONFIG_IPV6=n
From: Jakub Kicinski
Date: Fri Nov 18 2022 - 11:19:15 EST
On Fri, 18 Nov 2022 09:29:13 +0100 Geert Uytterhoeven wrote:
> IMHO this is worse, as the #ifdef/#endif is spread across the two branches
> of an if-conditional.
>
> Hence this is usually written as:
>
> if (cond1) {
> expensive_call1();
> }
> #ifdef cond2_enabled
> else {
> expensive_call1();
> }
> #endif
Alright, good enough for me.