From d4d48d9268ea5bb43382e4ed8241cccaa9d2e99a Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 11 Jun 2019 10:28:41 +0200 Subject: [PATCH] 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 Reviewed-by: Christine Caulfield --- exec/totemip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/totemip.c b/exec/totemip.c index 4c2eafee..7accf71a 100644 --- a/exec/totemip.c +++ b/exec/totemip.c @@ -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) {