Module Name: src
Committed By: skrll
Date: Tue Dec 18 16:23:20 UTC 2018
Modified Files:
src/sys/sys: cdefs.h
Log Message:
Appease gcc error: comparison of unsigned expression < 0 is always false
when using __BITS(u_int, 0)
To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/sys/cdefs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.138 src/sys/sys/cdefs.h:1.139
--- src/sys/sys/cdefs.h:1.138 Tue Dec 4 22:06:36 2018
+++ src/sys/sys/cdefs.h Tue Dec 18 16:23:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.138 2018/12/04 22:06:36 kamil Exp $ */
+/* $NetBSD: cdefs.h,v 1.139 2018/12/18 16:23:20 skrll Exp $ */
/* * Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -586,7 +586,7 @@
((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1))))
/* Macros for min/max. */
-#define __MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b))
+#define __MIN(a,b) ((/*CONSTCOND*/(a)<=(b))?(a):(b))
#define __MAX(a,b) ((/*CONSTCOND*/(a)>(b))?(a):(b))
/* __BITS(m, n): bits m through n, m < n. */