Kaynağa Gözat

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>
Jan Friesse 6 yıl önce
ebeveyn
işleme
d4d48d9268
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      exec/totemip.c

+ 2 - 2
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) {