]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] Fix a minor bug in isc_netaddr_masktoprefixlen
authorWitold Krecicki <wpk@isc.org>
Fri, 23 Sep 2016 12:56:53 +0000 (14:56 +0200)
committerWitold Krecicki <wpk@isc.org>
Tue, 27 Sep 2016 09:14:56 +0000 (11:14 +0200)
lib/isc/include/isc/netaddr.h
lib/isc/netaddr.c

index 43ad383f41d9f1e91e3e0c3c83b008f0e3dd6e86..4e341f763d27841ae8bf2078d2c418a315d8dc17 100644 (file)
@@ -57,7 +57,7 @@ isc_result_t
 isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp);
 /*%<
  * Convert a netmask in 's' into a prefix length in '*lenp'.
- * The mask should consist of zero or more '1' bits in the most
+ * The mask should consist of zero or more '1' bits in the
  * most significant part of the address, followed by '0' bits.
  * If this is not the case, #ISC_R_MASKNONCONTIG is returned.
  *
index 7dfc7a8dcc58db2fe9ea71ae0cdd09fcd36fbcb0..65779d39781b40e6bb536dcfa7911df754c03c1c 100644 (file)
@@ -270,7 +270,6 @@ isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp) {
        for (; i < ipbytes; i++) {
                if (p[i] != 0)
                        return (ISC_R_MASKNONCONTIG);
-               i++;
        }
        *lenp = nbytes * 8 + nbits;
        return (ISC_R_SUCCESS);