lkml.org 
[lkml]   [2015]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] decnet: remove macro-local declarations
From
From: Julia Lawall <julia.lawall@lip6.fr>
Date: Fri, 6 Nov 2015 11:57:34 +0100 (CET)

>> > Would it be preferable to remove the macro entirely and inline the for
>> > loop header?
>>
>> Could you show me an example of how this would look exactly?
>
> One possible solution is below. I moved the initialization of the nh
> pointer inside the loop to reduce the size of the loop header. One could
> also inline fi->fib_nh[nhsel] where it occurs, but it seemed that that
> would make quite long expressions.

Personally I like the explicit named iterator. It is descriptive and
tells that we are walking over all of the nexthops for a route.


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