mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Use MIN macro from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
a8945bbf62
commit
a175f065d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298912
@ -3171,7 +3171,7 @@ makemask(struct sockaddr_storage *ssp, int bitlen)
|
||||
return (-1);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen;
|
||||
bits = MIN(CHAR_BIT, bitlen);
|
||||
*p++ = (u_char)~0 << (CHAR_BIT - bits);
|
||||
bitlen -= bits;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user