From: Guus Sliepen Date: Tue, 8 Aug 2006 13:44:37 +0000 (+0000) Subject: Remove unused parameter from maskcmp(). X-Git-Tag: release-1.0.5~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ddcf079cad3351f0823fc07af15787d02e5f1901;p=oweals%2Ftinc.git Remove unused parameter from maskcmp(). --- diff --git a/src/netutl.c b/src/netutl.c index 6386e4c..83e19ed 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -225,7 +225,7 @@ void sockaddrunmap(sockaddr_t *sa) /* Subnet mask handling */ -int maskcmp(const void *va, const void *vb, int masklen, int len) +int maskcmp(const void *va, const void *vb, int masklen) { int i, m, result; const char *a = va; diff --git a/src/netutl.h b/src/netutl.h index d8afab7..bd642b1 100644 --- a/src/netutl.h +++ b/src/netutl.h @@ -35,7 +35,7 @@ extern int sockaddrcmp(const sockaddr_t *, const sockaddr_t *); extern void sockaddrunmap(sockaddr_t *); extern void sockaddrfree(sockaddr_t *); extern void sockaddrcpy(sockaddr_t *, const sockaddr_t *); -extern int maskcmp(const void *, const void *, int, int); +extern int maskcmp(const void *, const void *, int); extern void maskcpy(void *, const void *, int, int); extern void mask(void *, int, int); extern bool maskcheck(const void *, int, int); diff --git a/src/subnet.c b/src/subnet.c index 4ac625d..a4ec2b3 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -342,7 +342,7 @@ subnet_t *lookup_subnet_ipv4(const ipv4_t *address) break; } - if(!maskcmp(address, &p->net.ipv4.address, p->net.ipv4.prefixlength, sizeof(ipv4_t))) + if(!maskcmp(address, &p->net.ipv4.address, p->net.ipv4.prefixlength)) break; else { /* Otherwise, see if there is a bigger enclosing subnet */ @@ -378,7 +378,7 @@ subnet_t *lookup_subnet_ipv6(const ipv6_t *address) if(p->type != SUBNET_IPV6) return NULL; - if(!maskcmp(address, &p->net.ipv6.address, p->net.ipv6.prefixlength, sizeof(ipv6_t))) + if(!maskcmp(address, &p->net.ipv6.address, p->net.ipv6.prefixlength)) break; else { /* Otherwise, see if there is a bigger enclosing subnet */