lkml.org 
[lkml]   [2022]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] tcp: Fix tcp_syn_flood_action() if CONFIG_IPV6=n
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.

\
 
 \ /
  Last update: 2022-11-18 17:19    [W:0.061 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site