summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ncpaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/ncpaddr.c')
-rw-r--r--usr.sbin/ppp/ncpaddr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ncpaddr.c b/usr.sbin/ppp/ncpaddr.c
index ea491f1..e4f7084 100644
--- a/usr.sbin/ppp/ncpaddr.c
+++ b/usr.sbin/ppp/ncpaddr.c
@@ -142,16 +142,16 @@ mask62bits(const struct in6_addr *mask)
{
const u_char masks[] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
const u_char *c, *p, *end;
- int masklen;
+ int masklen, m;
p = (const u_char *)mask;
for (masklen = 0, end = p + 16; p < end && *p == 0xff; p++)
masklen += 8;
if (p < end) {
- for (c = masks; c < masks + sizeof masks; c++)
+ for (c = masks, m = 0; c < masks + sizeof masks; c++, m++)
if (*c == *p) {
- masklen += c - masks;
+ masklen += m;
break;
}
}
OpenPOWER on IntegriCloud