Reduces intentation by using early returns.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Jan 14 22:41:29 CET 2016 on sn-devel-144
done
- if $fail ; then
- if $up_interfaces_found && \
- [ "$CTDB_PARTIALLY_ONLINE_INTERFACES" = "yes" ] ; then
+ if ! $fail ; then
return 0
- else
+ fi
+
+ if ! $up_interfaces_found ; then
+ return 1
+ fi
+
+ if [ "$CTDB_PARTIALLY_ONLINE_INTERFACES" != "yes" ]; then
return 1
- fi
- else
- return 0
fi
+
+ return 0
}
# Sets: iface, ip, maskbits, family