Module Name: src
Committed By: christos
Date: Fri Jun 19 15:25:16 UTC 2009
Modified Files:
src/sys/sys: param.h
Log Message:
MIN and MAX could be used with constant predicates, and it does not matter
if they are, so make lint shut up.
To generate a diff of this commit:
cvs rdiff -u -r1.348 -r1.349 src/sys/sys/param.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/param.h
diff -u src/sys/sys/param.h:1.348 src/sys/sys/param.h:1.349
--- src/sys/sys/param.h:1.348 Sun Jun 14 17:37:06 2009
+++ src/sys/sys/param.h Fri Jun 19 11:25:16 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.348 2009/06/14 21:37:06 yamt Exp $ */
+/* $NetBSD: param.h,v 1.349 2009/06/19 15:25:16 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -344,8 +344,8 @@
#define powerof2(x) ((((x)-1)&(x))==0)
/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
+#define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b))
+#define MAX(a,b) ((/*CONSTCOND*/(a)>(b))?(a):(b))
/*
* Constants for setting the parameters of the kernel memory allocator.