ctdb-ipalloc: Move if-statement with broken condition
authorMartin Schwenke <martin@meltin.net>
Mon, 23 May 2016 04:41:43 +0000 (14:41 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 4 Jul 2016 13:42:24 +0000 (15:42 +0200)
commit03b300e0522eea97e8f894dc65240f0ed6e007f0
tree7e5096675025c245816ef72f37102d9584573346
parent27a26087e11c1154a750d2f8c2e3b46b8304a8d6
ctdb-ipalloc: Move if-statement with broken condition

This pointer is for an array that is always allocated.  The check is
meant to skip a node that has no IP addresses.  However, when there
are no IP addresses the loop below will not do anything anyway.

Add this as a check at the beginning of the function instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c