From 2ba29d4fbd61cb3c99cb19f190a25855f4a980fe Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 10 Jan 2016 09:33:03 +0100 Subject: common: Fix use of && instead of & --- common/sock-any.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/sock-any.c b/common/sock-any.c index 4613931..5155a30 100644 --- a/common/sock-any.c +++ b/common/sock-any.c @@ -371,14 +371,14 @@ sock_any_cmp (const struct sockaddr_any* a1, const struct sockaddr_any* a2, int case AF_INET: if (memcmp (&(a1->s.in.sin_addr), &(a2->s.in.sin_addr), sizeof(a2->s.in.sin_addr)) != 0) return -1; - if (!(opts && SANY_OPT_NOPORT) && a1->s.in.sin_port != a2->s.in.sin_port) + if (!(opts & SANY_OPT_NOPORT) && a1->s.in.sin_port != a2->s.in.sin_port) return -1; return 0; #ifdef HAVE_INET6 case AF_INET6: if(memcmp(&(a1->s.in6.sin6_addr), &(a2->s.in6.sin6_addr), sizeof(a2->s.in6.sin6_addr)) != 0) return -1; - if(!(opts && SANY_OPT_NOPORT) && a1->s.in6.sin6_port != a2->s.in6.sin6_port) + if(!(opts & SANY_OPT_NOPORT) && a1->s.in6.sin6_port != a2->s.in6.sin6_port) return -1; return 0; #endif -- cgit v1.2.3