Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Appease gcc error: comparison of unsigned expression...



details:   https://anonhg.NetBSD.org/src/rev/b1f5318d78c8
branches:  trunk
changeset: 446769:b1f5318d78c8
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Dec 18 16:23:20 2018 +0000

description:
Appease gcc error: comparison of unsigned expression < 0 is always false
when using __BITS(u_int, 0)

diffstat:

 sys/sys/cdefs.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 5d8450825b90 -r b1f5318d78c8 sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Tue Dec 18 12:55:38 2018 +0000
+++ b/sys/sys/cdefs.h   Tue Dec 18 16:23:20 2018 +0000
@@ -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. */



Home | Main Index | Thread Index | Old Index