Răsfoiți Sursa

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>
(cherry picked from commit d4d48d9268ea5bb43382e4ed8241cccaa9d2e99a)
Jan Friesse 6 ani în urmă
părinte
comite
be7c900ca9
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      exec/totemip.c

+ 2 - 2
exec/totemip.c

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