Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2017 21:59:05 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315747 - head/usr.bin/diff
Message-ID:  <201703222159.v2MLx5OL036447@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Wed Mar 22 21:59:04 2017
New Revision: 315747
URL: https://svnweb.freebsd.org/changeset/base/315747

Log:
  Use MIN macros from sys/param.h

Modified:
  head/usr.bin/diff/diffreg.c

Modified: head/usr.bin/diff/diffreg.c
==============================================================================
--- head/usr.bin/diff/diffreg.c	Wed Mar 22 21:52:22 2017	(r315746)
+++ head/usr.bin/diff/diffreg.c	Wed Mar 22 21:59:04 2017	(r315747)
@@ -611,7 +611,7 @@ prepare(int i, FILE *fd, size_t filesize
 
 	rewind(fd);
 
-	sz = ((unsigned long)filesize <= SIZE_MAX ? filesize : SIZE_MAX) / 25;
+	sz = MIN(filesize, SIZE_MAX) / 25;
 	if (sz < 100)
 		sz = 100;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703222159.v2MLx5OL036447>