totemip: Use res in totemip_sa_equal

Setting res to -1 was not entirely following semantics of "equal"
operation. Set it to 0 and return it when families differs makes
compiler happy.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
This commit is contained in:
Jan Friesse 2019-06-11 10:28:41 +02:00
parent 299c9c5b70
commit d4d48d9268

View File

@ -97,10 +97,10 @@ int totemip_sa_equal(const struct totem_ip_address *totem_ip,
{
int res;
res = -1;
res = 0;
if (totem_ip->family != sa->sa_family) {
return 0;
return (res);
}
switch (totem_ip->family) {