[PATCHES] ctdb - slightly refactor the vacuum_fetch loop
amitay at gmail.com
Thu Jun 4 18:57:42 MDT 2015
On Thu, Jun 4, 2015 at 4:26 PM, Michael Adam <obnox at samba.org> wrote:
> attached is a patchset that slightly reworks the loop in the
> vacuum fetch handler of ctdb. So that the result reads much
> more naturally imho, than the original code. (reducing
> indentation and makin the talloc/free bracket around the
> loop more obvious. It does not change the behaviour.
> (Note: The original patchset first renamed vacuum_fetch_next
> to vacuum_fetch_loop and amended the function header comment,
> but since I finally removed the function, moving the loop back
> into vacuum_fetch_handler, I removed these changes.)
> Review etc appreciated!
> Cheers - Michael
The reworking looks good.
For the second last patch that converts while loop into for loop, I would
prefer not to overload the for loop assignments and conditions. Keep only
iterator variables in the for statement and move other assignments and
conditions in the body of the loop.
Also, if you don't mind can you use "ctdb-foobar:" instead of
"ctdb:foobar:" in the commit messages? It makes easier to import the
patches to 2.5 with a script. :-)
More information about the samba-technical