浏览代码

core: typo fix in ip_addr_loopback()

- compiling ser without -DUSE_IPV6 used to fail because of a misplaced
bracket
Andrei Pelinescu-Onciul 17 年之前
父节点
当前提交
f52aa05b99
共有 1 个文件被更改,包括 2 次插入2 次删除
  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 */
  * 0 otherwise */
 inline static int ip_addr_loopback(struct ip_addr* ip)
 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);
 		return ip->u.addr32[0]==htonl(INADDR_LOOPBACK);
 #ifdef USE_IPV6
 #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);
 		return IN6_IS_ADDR_LOOPBACK((struct in6_addr *)&ip->u.addr32);
 #endif /* USE_IPV6 */
 #endif /* USE_IPV6 */
 	return 0;
 	return 0;