I will do my best to match existing coding style.
How about using tabs?
I cannot figure out if elfutils prefers tabs or not.
Some statement blocks have some lines indented by tabs and some by spaces.
Would it be okay to use all spaces?
On Thu, Sep 17, 2015 at 1:04 PM, Roland McGrath <roland(a)hack.frob.com>
wrote:
> Does the new walk_children look right to you?
> That style is similar to what I would use when I need to factor out code
in
> large C functions. It should be general enough to replace all nested
> functions in elfutils.
The general style of factoring out the shared locals into by-reference
parameters of the subfunction is right. How much to put into a bespoke
local struct and how much to do with multiple parameters is a case by case
decision about what feels most clean and concise in the source code.
I don't favor typedefs for private types like that. Just use 'struct foo'.
Some of the indentation choices and other style nits didn't look quite
right off hand, but those are trivia.