diff options
author | peter <peter@FreeBSD.org> | 2003-05-25 07:39:06 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-05-25 07:39:06 +0000 |
commit | 9a47cfedaa161760fa17eca1844ce525389199b2 (patch) | |
tree | 7c8852415a6fcdf63627562e9f42b2a3c50b212d /usr.sbin/ppp | |
parent | 06e262084666d7dc1751ef238f161960cbdbbc68 (diff) | |
download | FreeBSD-src-9a47cfedaa161760fa17eca1844ce525389199b2.zip FreeBSD-src-9a47cfedaa161760fa17eca1844ce525389199b2.tar.gz |
Add a pretty cheesy hack to avoid a gcc-3.2.2 ICE (internal compiler
error) on amd64 when doing pointer subtraction. This bug is already
fixed in gcc-3.3 (waiting for after the branch), and the hack will be
backed out at the first opportunity. This is in the ipv6 code path.
Approved by: re (scottl)
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ncpaddr.c | 6 |
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; } } |