ctdb tool - simplify main() by taking most code out of a loop
authorMartin Schwenke <martin@meltin.net>
Tue, 29 Nov 2011 03:20:26 +0000 (14:20 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 6 Dec 2011 02:59:32 +0000 (13:59 +1100)
commit5f69ad3c0a9cea324f4751ae92e3f7957a633a5a
tree16f19c678b91ae1d8bd37fb9513a063f3ead5c40
parentc3ee62439fe9db1560db29d13b7433bfadcda40d
ctdb tool - simplify main() by taking most code out of a loop

Most of the action in main() happens inside a for loop and an if
statement.  This causes 2 levels of extra indent for the code and
makes it harder to read.

Instead, the current body of the loop is put below the loop and its
corresponding failure check.

To see how small this change really is, view with "diff -w".  ;-)

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8527396b7290cfc8378779631e91d2ae09e2a106)
ctdb/tools/ctdb.c