MIN -> min, MAX -> max
This commit is contained in:
parent
b57fc3b35b
commit
ebcaebd335
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: Utah Hdr: mem.c 1.13 89/10/08
|
||||
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: mem.c,v 1.20 1994/05/23 03:02:39 cgd Exp $
|
||||
* $Id: mem.c,v 1.21 1994/05/24 02:37:59 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -123,8 +123,8 @@ mmrw(dev, uio, flags)
|
||||
TRUE);
|
||||
o = (int)uio->uio_offset & PGOFSET;
|
||||
c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
|
||||
c = MIN(c, (u_int)(NBPG - o));
|
||||
c = MIN(c, (u_int)iov->iov_len);
|
||||
c = min(c, (u_int)(NBPG - o));
|
||||
c = min(c, (u_int)iov->iov_len);
|
||||
error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
|
||||
pmap_remove(kernel_pmap, (vm_offset_t)vmmap,
|
||||
(vm_offset_t)&vmmap[NBPG]);
|
||||
@ -158,7 +158,7 @@ mmrw(dev, uio, flags)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zbuf, CLBYTES);
|
||||
}
|
||||
c = MIN(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
error = uiomove(zbuf, (int)c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
* Currently supports the Western Digital/SMC 8003 and 8013 series, the 3Com
|
||||
* 3c503, the NE1000 and NE2000, and a variety of similar clones.
|
||||
*
|
||||
* $Id: if_ed.c,v 1.48 1994/05/19 07:47:34 mycroft Exp $
|
||||
* $Id: if_ed.c,v 1.49 1994/05/24 02:38:08 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "bpfilter.h"
|
||||
@ -1428,7 +1428,7 @@ outloop:
|
||||
} else
|
||||
len = ed_pio_write_mbufs(sc, m, (u_short)buffer);
|
||||
|
||||
sc->txb_len[sc->txb_new] = MAX(len, ETHER_MIN_LEN);
|
||||
sc->txb_len[sc->txb_new] = max(len, ETHER_MIN_LEN);
|
||||
|
||||
sc->txb_inuse++;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
* Currently supports the Western Digital/SMC 8003 and 8013 series, the 3Com
|
||||
* 3c503, the NE1000 and NE2000, and a variety of similar clones.
|
||||
*
|
||||
* $Id: if_ed.c,v 1.48 1994/05/19 07:47:34 mycroft Exp $
|
||||
* $Id: if_ed.c,v 1.49 1994/05/24 02:38:08 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "bpfilter.h"
|
||||
@ -1428,7 +1428,7 @@ outloop:
|
||||
} else
|
||||
len = ed_pio_write_mbufs(sc, m, (u_short)buffer);
|
||||
|
||||
sc->txb_len[sc->txb_new] = MAX(len, ETHER_MIN_LEN);
|
||||
sc->txb_len[sc->txb_new] = max(len, ETHER_MIN_LEN);
|
||||
|
||||
sc->txb_inuse++;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: isofs_vnops.c,v 1.17 1994/04/25 03:49:32 cgd Exp $
|
||||
* $Id: isofs_vnops.c,v 1.18 1994/05/24 02:38:39 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -196,7 +196,7 @@ isofs_read(vp, uio, ioflag, cred)
|
||||
do {
|
||||
lbn = iso_lblkno(imp, uio->uio_offset);
|
||||
on = iso_blkoff(imp, uio->uio_offset);
|
||||
n = MIN((unsigned)(imp->logical_block_size - on), uio->uio_resid);
|
||||
n = min((unsigned)(imp->logical_block_size - on), uio->uio_resid);
|
||||
diff = ip->i_size - uio->uio_offset;
|
||||
if (diff <= 0)
|
||||
return (0);
|
||||
@ -211,7 +211,7 @@ isofs_read(vp, uio, ioflag, cred)
|
||||
else
|
||||
error = bread(ITOV(ip), lbn, size, NOCRED, &bp);
|
||||
vp->v_lastr = lbn;
|
||||
n = MIN(n, size - bp->b_resid);
|
||||
n = min(n, size - bp->b_resid);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
|
@ -27,7 +27,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: exec_script.c,v 1.5 1994/04/29 08:35:29 cgd Exp $
|
||||
* $Id: exec_script.c,v 1.6 1994/05/24 02:39:13 cgd Exp $
|
||||
*/
|
||||
|
||||
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
|
||||
@ -92,7 +92,7 @@ exec_script_makecmds(p, epp)
|
||||
* (The latter requirement means that we have to check
|
||||
* for both spaces and tabs later on.)
|
||||
*/
|
||||
hdrlinelen = MIN(epp->ep_hdrvalid, MAXINTERP);
|
||||
hdrlinelen = min(epp->ep_hdrvalid, MAXINTERP);
|
||||
for (cp = hdrstr + EXEC_SCRIPT_MAGICLEN; cp < hdrstr + hdrlinelen;
|
||||
cp++) {
|
||||
if (*cp == '\n') {
|
||||
|
@ -1 +1 @@
|
||||
revision 1.50 intentionally removed
|
||||
revision 1.51 intentionally removed
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)spec_vnops.c 7.37 (Berkeley) 5/30/91
|
||||
* $Id: spec_vnops.c,v 1.13 1994/04/21 07:48:55 cgd Exp $
|
||||
* $Id: spec_vnops.c,v 1.14 1994/05/24 02:36:33 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -213,14 +213,14 @@ spec_read(vp, uio, ioflag, cred)
|
||||
do {
|
||||
bn = (uio->uio_offset / DEV_BSIZE) &~ (bscale - 1);
|
||||
on = uio->uio_offset % bsize;
|
||||
n = MIN((unsigned)(bsize - on), uio->uio_resid);
|
||||
n = min((unsigned)(bsize - on), uio->uio_resid);
|
||||
if (vp->v_lastr + bscale == bn)
|
||||
error = breada(vp, bn, (int)bsize, bn + bscale,
|
||||
(int)bsize, NOCRED, &bp);
|
||||
else
|
||||
error = bread(vp, bn, (int)bsize, NOCRED, &bp);
|
||||
vp->v_lastr = bn;
|
||||
n = MIN(n, bsize - bp->b_resid);
|
||||
n = min(n, bsize - bp->b_resid);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
@ -300,12 +300,12 @@ spec_write(vp, uio, ioflag, cred)
|
||||
do {
|
||||
bn = (uio->uio_offset / DEV_BSIZE) &~ blkmask;
|
||||
on = uio->uio_offset % bsize;
|
||||
n = MIN((unsigned)(bsize - on), uio->uio_resid);
|
||||
n = min((unsigned)(bsize - on), uio->uio_resid);
|
||||
if (n == bsize)
|
||||
bp = getblk(vp, bn, bsize, 0, 0);
|
||||
else
|
||||
error = bread(vp, bn, bsize, NOCRED, &bp);
|
||||
n = MIN(n, bsize - bp->b_resid);
|
||||
n = min(n, bsize - bp->b_resid);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
|
@ -354,7 +354,7 @@ msdosfs_read(vp, uio, ioflag, cred)
|
||||
do {
|
||||
lbn = uio->uio_offset >> pmp->pm_cnshift;
|
||||
on = uio->uio_offset & pmp->pm_crbomask;
|
||||
n = MIN((u_long) (pmp->pm_bpcluster - on), uio->uio_resid);
|
||||
n = min((u_long) (pmp->pm_bpcluster - on), uio->uio_resid);
|
||||
diff = dep->de_FileSize - uio->uio_offset;
|
||||
if (diff <= 0)
|
||||
return 0;
|
||||
@ -386,7 +386,7 @@ msdosfs_read(vp, uio, ioflag, cred)
|
||||
}
|
||||
vp->v_lastr = lbn;
|
||||
}
|
||||
n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
|
||||
n = min(n, pmp->pm_bpcluster - bp->b_resid);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return error;
|
||||
@ -530,7 +530,7 @@ msdosfs_write(vp, uio, ioflag, cred)
|
||||
return error;
|
||||
}
|
||||
croffset = uio->uio_offset & pmp->pm_crbomask;
|
||||
n = MIN(uio->uio_resid, pmp->pm_bpcluster - croffset);
|
||||
n = min(uio->uio_resid, pmp->pm_bpcluster - croffset);
|
||||
if (uio->uio_offset + n > dep->de_FileSize) {
|
||||
dep->de_FileSize = uio->uio_offset + n;
|
||||
vnode_pager_setsize(vp, dep->de_FileSize); /* why? */
|
||||
@ -1366,7 +1366,7 @@ msdosfs_readdir(vp, uio, cred, eofflagp, cookies, ncookies)
|
||||
while (!error && uio->uio_resid > 0 && ncookies > 0) {
|
||||
lbn = (uio->uio_offset - bias) >> pmp->pm_cnshift;
|
||||
on = (uio->uio_offset - bias) & pmp->pm_crbomask;
|
||||
n = MIN((u_long) (pmp->pm_bpcluster - on), uio->uio_resid);
|
||||
n = min((u_long) (pmp->pm_bpcluster - on), uio->uio_resid);
|
||||
diff = dep->de_FileSize - (uio->uio_offset - bias);
|
||||
if (diff <= 0)
|
||||
return 0;
|
||||
@ -1376,7 +1376,7 @@ msdosfs_readdir(vp, uio, cred, eofflagp, cookies, ncookies)
|
||||
if (error)
|
||||
break;
|
||||
error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster, NOCRED, &bp);
|
||||
n = MIN(n, pmp->pm_bpcluster - bp->b_resid);
|
||||
n = min(n, pmp->pm_bpcluster - bp->b_resid);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user