1
0
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:
Marcelo Araujo 2016-05-02 01:49:42 +00:00
parent a8945bbf62
commit a175f065d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298912

View File

@ -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;
}