Jelajahi Sumber

core: typo fix in ip_addr_loopback()

- compiling ser without -DUSE_IPV6 used to fail because of a misplaced
bracket
Andrei Pelinescu-Onciul 17 tahun lalu
induk
melakukan
f52aa05b99
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      ip_addr.h

+ 2 - 2
ip_addr.h

@@ -238,10 +238,10 @@ inline static int ip_addr_any(struct ip_addr* ip)
  * 0 otherwise */
 inline static int ip_addr_loopback(struct ip_addr* ip)
 {
-	if (ip->af==AF_INET){
+	if (ip->af==AF_INET)
 		return ip->u.addr32[0]==htonl(INADDR_LOOPBACK);
 #ifdef USE_IPV6
-	} else if (ip->af==AF_INET6)
+	else if (ip->af==AF_INET6)
 		return IN6_IS_ADDR_LOOPBACK((struct in6_addr *)&ip->u.addr32);
 #endif /* USE_IPV6 */
 	return 0;