Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/common/include/linux Actually use the type ...
details: https://anonhg.NetBSD.org/src/rev/8b5da1346773
branches: trunk
changeset: 1027810:8b5da1346773
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 00:48:09 2021 +0000
description:
Actually use the type in min_t/max_t.
Otherwise we do not get the truncation we might expect. Probably not
a big deal, but we should match the semantics.
XXX pullup-7
XXX pullup-8
diffstat:
sys/external/bsd/common/include/linux/kernel.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r d4ae13c3e350 -r 8b5da1346773 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 00:48:02 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h Sun Dec 19 00:48:09 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.28 2021/12/19 00:47:47 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.29 2021/12/19 00:48:09 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -89,8 +89,8 @@
#define min(X, Y) MIN(X, Y)
#define max(X, Y) MAX(X, Y)
-#define max_t(T, X, Y) MAX(X, Y)
-#define min_t(T, X, Y) MIN(X, Y)
+#define max_t(T, X, Y) MAX((T)(X), (T)(Y))
+#define min_t(T, X, Y) MIN((T)(X), (T)(Y))
#define clamp_t(T, X, MIN, MAX) min_t(T, max_t(T, X, MIN), MAX)
#define clamp(X, MN, MX) MIN(MAX(X, MN), MX)
Home |
Main Index |
Thread Index |
Old Index