Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/stand/efiboot Fix some min/max -> uimin/uimax stragglers.
details: https://anonhg.NetBSD.org/src/rev/12a3349d6afb
branches: trunk
changeset: 993315:12a3349d6afb
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Sep 04 15:08:30 2018 +0000
description:
Fix some min/max -> uimin/uimax stragglers.
Confirmed by the 2018-09-04T04:40Z autobuild.
diffstat:
sys/arch/cobalt/stand/boot/lcd.c | 4 ++--
sys/arch/ews4800mips/stand/common/lance.c | 6 +++---
sys/arch/hp300/stand/inst/inst.c | 4 ++--
sys/arch/hppa/stand/common/lif.c | 4 ++--
sys/arch/ia64/stand/common/interp_parse.c | 4 ++--
sys/arch/luna68k/stand/boot/lance.c | 6 +++---
sys/arch/next68k/next68k/disksubr.c | 16 ++++++++--------
sys/stand/efiboot/efinet.c | 4 ++--
8 files changed, 24 insertions(+), 24 deletions(-)
diffs (197 lines):
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/cobalt/stand/boot/lcd.c
--- a/sys/arch/cobalt/stand/boot/lcd.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/cobalt/stand/boot/lcd.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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);
}
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/ews4800mips/stand/common/lance.c
--- a/sys/arch/ews4800mips/stand/common/lance.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/ews4800mips/stand/common/lance.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/hp300/stand/inst/inst.c
--- a/sys/arch/hp300/stand/inst/inst.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/hp300/stand/inst/inst.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
}
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"
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/hppa/stand/common/lif.c
--- a/sys/arch/hppa/stand/common/lif.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/hppa/stand/common/lif.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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;
}
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/ia64/stand/common/interp_parse.c
--- a/sys/arch/ia64/stand/common/interp_parse.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/ia64/stand/common/interp_parse.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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);
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/luna68k/stand/boot/lance.c
--- a/sys/arch/luna68k/stand/boot/lance.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/luna68k/stand/boot/lance.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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 @@
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 */
diff -r feeebdd3c807 -r 12a3349d6afb sys/arch/next68k/next68k/disksubr.c
--- a/sys/arch/next68k/next68k/disksubr.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/arch/next68k/next68k/disksubr.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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 @@
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;
diff -r feeebdd3c807 -r 12a3349d6afb sys/stand/efiboot/efinet.c
--- a/sys/stand/efiboot/efinet.c Tue Sep 04 14:31:18 2018 +0000
+++ b/sys/stand/efiboot/efinet.c Tue Sep 04 15:08:30 2018 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index