'addrlen' does not matter when we need to find the first non-zero bit in
the byte from the left and 'addrlen' already counted in 'lim'. PR: 212121 Submitted by: Herbie.Robinson@stratus.com MFC after: 7 days
This commit is contained in:
parent
bce38b9f35
commit
e1ec67bbc9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305144
@ -949,7 +949,7 @@ matchlen(struct sockaddr *src, struct sockaddr *dst)
|
||||
|
||||
while (s < lim)
|
||||
if ((r = (*d++ ^ *s++)) != 0) {
|
||||
while (r < addrlen * 8) {
|
||||
while ((r & 0x80) == 0) {
|
||||
match++;
|
||||
r <<= 1;
|
||||
}
|
||||
|
@ -930,7 +930,7 @@ matchlen(struct sockaddr *src, struct sockaddr *dst)
|
||||
|
||||
while (s < lim)
|
||||
if ((r = (*d++ ^ *s++)) != 0) {
|
||||
while (r < addrlen * 8) {
|
||||
while ((r & 0x80) == 0) {
|
||||
match++;
|
||||
r <<= 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user