Module Name:    src
Committed By:   riastradh
Date:           Tue Sep  4 15:08:30 UTC 2018

Modified Files:
        src/sys/arch/cobalt/stand/boot: lcd.c
        src/sys/arch/ews4800mips/stand/common: lance.c
        src/sys/arch/hp300/stand/inst: inst.c
        src/sys/arch/hppa/stand/common: lif.c
        src/sys/arch/ia64/stand/common: interp_parse.c
        src/sys/arch/luna68k/stand/boot: lance.c
        src/sys/arch/next68k/next68k: disksubr.c
        src/sys/stand/efiboot: efinet.c

Log Message:
Fix some min/max -> uimin/uimax stragglers.

Confirmed by the 2018-09-04T04:40Z autobuild.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/cobalt/stand/boot/lcd.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ews4800mips/stand/common/lance.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hp300/stand/inst/inst.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/common/lif.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/common/interp_parse.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/luna68k/stand/boot/lance.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/next68k/next68k/disksubr.c
cvs rdiff -u -r1.1 -r1.2 src/sys/stand/efiboot/efinet.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/cobalt/stand/boot/lcd.c
diff -u src/sys/arch/cobalt/stand/boot/lcd.c:1.2 src/sys/arch/cobalt/stand/boot/lcd.c:1.3
--- src/sys/arch/cobalt/stand/boot/lcd.c:1.2	Thu May 29 14:25:01 2008
+++ src/sys/arch/cobalt/stand/boot/lcd.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lcd.c,v 1.2 2008/05/29 14:25:01 tsutsui Exp $	*/
+/*	$NetBSD: lcd.c,v 1.3 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 Izumi Tsutsui.  All rights reserved.
@@ -88,7 +88,7 @@ void
 lcd_loadfile(const char *file)
 {
 
-	memcpy(loadfile_message.row2, file, min(NCOLS, strlen(file)));
+	memcpy(loadfile_message.row2, file, uimin(NCOLS, strlen(file)));
 
 	lcd_puts(&loadfile_message);
 }

Index: src/sys/arch/ews4800mips/stand/common/lance.c
diff -u src/sys/arch/ews4800mips/stand/common/lance.c:1.6 src/sys/arch/ews4800mips/stand/common/lance.c:1.7
--- src/sys/arch/ews4800mips/stand/common/lance.c:1.6	Sun Jan 13 14:24:24 2013
+++ src/sys/arch/ews4800mips/stand/common/lance.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lance.c,v 1.6 2013/01/13 14:24:24 tsutsui Exp $	*/
+/*	$NetBSD: lance.c,v 1.7 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -161,14 +161,14 @@ lance_put(void *data, size_t len)
 	tmd->tmd1_bits = LE_T1_STP;
 	for (i = 0; i < 8; i++) {
 		current = (current + 1) & 0x7;
-		n = min(len, 512);
+		n = uimin(len, 512);
 		p = (uint8_t *)((tmd->tmd1_hadr << 16) | tmd->tmd0 |
 		    0xa0000000);
 		for (j = 0; j < n; j++)
 			*p++ = *q++;
 		len -= n;
 #if 1
-		tmd->tmd2 = -max(n, 64) | 0xf000;
+		tmd->tmd2 = -uimax(n, 64) | 0xf000;
 #else
 		tmd->tmd2 = -n | 0xf000;
 #endif

Index: src/sys/arch/hp300/stand/inst/inst.c
diff -u src/sys/arch/hp300/stand/inst/inst.c:1.22 src/sys/arch/hp300/stand/inst/inst.c:1.23
--- src/sys/arch/hp300/stand/inst/inst.c:1.22	Sat Jun 11 06:20:11 2016
+++ src/sys/arch/hp300/stand/inst/inst.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: inst.c,v 1.22 2016/06/11 06:20:11 dholland Exp $	*/
+/*	$NetBSD: inst.c,v 1.23 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -356,7 +356,7 @@ get_fstype(struct disklabel *lp, int par
 	}
 
 	fragsize = blocksize / 8;	/* XXX */
-	fragsize = max(fragsize, lp->d_secsize);
+	fragsize = uimax(fragsize, lp->d_secsize);
 	GETNUM("             FFS fragment size? [%d] ", fragsize);
 	if (fragsize < lp->d_secsize || (fragsize % lp->d_secsize) != 0) {
 		printf("FFS fragment size must be a multiple of sector size"

Index: src/sys/arch/hppa/stand/common/lif.c
diff -u src/sys/arch/hppa/stand/common/lif.c:1.1 src/sys/arch/hppa/stand/common/lif.c:1.2
--- src/sys/arch/hppa/stand/common/lif.c:1.1	Mon Feb 24 07:23:43 2014
+++ src/sys/arch/hppa/stand/common/lif.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lif.c,v 1.1 2014/02/24 07:23:43 skrll Exp $	*/
+/*	$NetBSD: lif.c,v 1.2 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*	$OpenBSD: lif.c,v 1.7 2001/06/09 03:54:41 mickey Exp $	*/
 
@@ -179,7 +179,7 @@ lif_read(struct open_file *f, void *buf,
 			break;
 		if (p == bbuf) {
 			bsize = sizeof(bbuf) - (foff & (sizeof(bbuf) - 1));
-			bsize = min(bsize, size);
+			bsize = uimin(bsize, size);
 			memcpy(buf, bbuf + (foff & (sizeof(bbuf) - 1)), bsize);
 			p = buf;
 		}

Index: src/sys/arch/ia64/stand/common/interp_parse.c
diff -u src/sys/arch/ia64/stand/common/interp_parse.c:1.5 src/sys/arch/ia64/stand/common/interp_parse.c:1.6
--- src/sys/arch/ia64/stand/common/interp_parse.c:1.5	Mon Oct 26 19:16:56 2009
+++ src/sys/arch/ia64/stand/common/interp_parse.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: interp_parse.c,v 1.5 2009/10/26 19:16:56 cegger Exp $	*/
+/*	$NetBSD: interp_parse.c,v 1.6 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*-
  * Redistribution and use in source and binary forms, with or without
@@ -153,7 +153,7 @@ parse(int *argc, char ***argv, char *str
 		size_t len = strlen(val);
 
 		strncpy(buf + i, val, PARSE_BUFSIZE - (i + 1));
-		i += min(len, PARSE_BUFSIZE - 1);
+		i += uimin(len, PARSE_BUFSIZE - 1);
 	    }
 	    *q = tmp;	/* restore value */
 	    p = q + (token ? 1 : 0);

Index: src/sys/arch/luna68k/stand/boot/lance.c
diff -u src/sys/arch/luna68k/stand/boot/lance.c:1.3 src/sys/arch/luna68k/stand/boot/lance.c:1.4
--- src/sys/arch/luna68k/stand/boot/lance.c:1.3	Wed Apr 16 11:18:00 2014
+++ src/sys/arch/luna68k/stand/boot/lance.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lance.c,v 1.3 2014/04/16 11:18:00 tsutsui Exp $	*/
+/*	$NetBSD: lance.c,v 1.4 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2013 Izumi Tsutsui.  All rights reserved.
@@ -172,7 +172,7 @@ lance_get(void *cookie, void *data, size
 		goto out;
 	}
 	len -= 4;
-	memcpy(data, (void *)lemem->lem_rbuf[sc->sc_currmd], min(len, maxlen));
+	memcpy(data, (void *)lemem->lem_rbuf[sc->sc_currmd], uimin(len, maxlen));
 
  out:
 	rmd->rmd2 = -LEMTU;
@@ -208,7 +208,7 @@ lance_put(void *cookie, void *data, size
 		continue;
 	tmd->tmd1_bits = LE_T1_STP | LE_T1_ENP;
 	memcpy((void *)lemem->lem_tbuf[sc->sc_curtmd], data, len);
-	tmd->tmd2 = -max(len, LEMINSIZE);
+	tmd->tmd2 = -uimax(len, LEMINSIZE);
 	tmd->tmd3 = 0;
 
 	/* start TX */

Index: src/sys/arch/next68k/next68k/disksubr.c
diff -u src/sys/arch/next68k/next68k/disksubr.c:1.28 src/sys/arch/next68k/next68k/disksubr.c:1.29
--- src/sys/arch/next68k/next68k/disksubr.c:1.28	Fri Jan  2 19:42:06 2015
+++ src/sys/arch/next68k/next68k/disksubr.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.28 2015/01/02 19:42:06 christos Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.29 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.28 2015/01/02 19:42:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.29 2018/09/04 15:08:30 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -94,11 +94,11 @@ parse_nextstep_label(struct next68k_disk
 	if (sizeof (lp->d_typename) > sizeof (ondisk->cd_name))
 		lp->d_typename[sizeof (ondisk->cd_name)] = '\0';
 	memcpy (lp->d_typename, ondisk->cd_name,
-		min (sizeof (lp->d_typename), sizeof (ondisk->cd_name)));
+		uimin (sizeof (lp->d_typename), sizeof (ondisk->cd_name)));
 	if (sizeof (lp->d_packname) > sizeof (ondisk->cd_label))
 		lp->d_packname[sizeof (ondisk->cd_label)] = '\0';
 	memcpy (lp->d_packname, ondisk->cd_label,
-		 min (sizeof (lp->d_packname), sizeof (ondisk->cd_label)));
+		 uimin (sizeof (lp->d_packname), sizeof (ondisk->cd_label)));
 	if (lp->d_secsize == 0)
 		lp->d_secsize = ondisk->cd_secsize;
 	KASSERT(ondisk->cd_secsize >= lp->d_secsize);
@@ -191,17 +191,17 @@ build_nextstep_label(struct next68k_disk
 	KASSERT(ondisk->cd_secsize >= lp->d_secsize);
 
 	if (memcmp (ondisk->cd_name, lp->d_typename,
-		     min (sizeof (lp->d_typename), sizeof (ondisk->cd_name))) &&
+		     uimin (sizeof (lp->d_typename), sizeof (ondisk->cd_name))) &&
 	    sizeof (ondisk->cd_name) > sizeof (lp->d_typename))
 		ondisk->cd_name[sizeof (lp->d_typename)] = '\0';
 	memcpy (ondisk->cd_name, lp->d_typename,
-		min (sizeof (lp->d_typename), sizeof (ondisk->cd_name)));
+		uimin (sizeof (lp->d_typename), sizeof (ondisk->cd_name)));
 	if (memcmp (lp->d_packname, ondisk->cd_label,
-		    min (sizeof (lp->d_packname), sizeof (ondisk->cd_label))) &&
+		    uimin (sizeof (lp->d_packname), sizeof (ondisk->cd_label))) &&
 	    sizeof (ondisk->cd_label) > sizeof (lp->d_packname))
 		ondisk->cd_label[sizeof (lp->d_packname)] = '\0';
 	memcpy (ondisk->cd_label, lp->d_packname,
-		min (sizeof (lp->d_packname), sizeof (ondisk->cd_label)));
+		uimin (sizeof (lp->d_packname), sizeof (ondisk->cd_label)));
 
 	ondisk->cd_nsectors = lp->d_nsectors;
 	ondisk->cd_ntracks = lp->d_ntracks;

Index: src/sys/stand/efiboot/efinet.c
diff -u src/sys/stand/efiboot/efinet.c:1.1 src/sys/stand/efiboot/efinet.c:1.2
--- src/sys/stand/efiboot/efinet.c:1.1	Mon Sep  3 00:04:02 2018
+++ src/sys/stand/efiboot/efinet.c	Tue Sep  4 15:08:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: efinet.c,v 1.1 2018/09/03 00:04:02 jmcneill Exp $	*/
+/*	$NetBSD: efinet.c,v 1.2 2018/09/04 15:08:30 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2001 Doug Rabson
@@ -203,7 +203,7 @@ efinet_get(struct iodesc *desc, void *pk
 		status = uefi_call_wrapper(net->Receive, 7, net, NULL, &rsz, ptr,
 		    NULL, NULL, NULL);
 		if (!EFI_ERROR(status)) {
-			rsz = min(rsz, len);
+			rsz = uimin(rsz, len);
 			memcpy(pkt, ptr, rsz);
 			ret = (int)rsz;
 			break;

Reply via email to