svn commit: r298912 - head/usr.sbin/mountd

Marcelo Araujo araujo at FreeBSD.org
Mon May 2 01:49:44 UTC 2016


Author: araujo
Date: Mon May  2 01:49:42 2016
New Revision: 298912
URL: https://svnweb.freebsd.org/changeset/base/298912

Log:
  Use MIN macro from sys/param.h.
  
  MFC after:	2 weeks.

Modified:
  head/usr.sbin/mountd/mountd.c

Modified: head/usr.sbin/mountd/mountd.c
==============================================================================
--- head/usr.sbin/mountd/mountd.c	Mon May  2 01:47:13 2016	(r298911)
+++ head/usr.sbin/mountd/mountd.c	Mon May  2 01:49:42 2016	(r298912)
@@ -3171,7 +3171,7 @@ makemask(struct sockaddr_storage *ssp, i
 		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;
 	}


More information about the svn-src-all mailing list