From 20d04774f4ef3f6e38974636e0e36ae0f0b5501f Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Thu, 30 Oct 2008 17:35:30 -0500 Subject: Consolidate MAX/MIN definitions There were several, now there is one (two if you count the lower-case versions). Signed-off-by: Andy Fleming --- include/common.h | 3 +++ include/usbdcore.h | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index b8a654a8ad0..df64bf0f419 100644 --- a/include/common.h +++ b/include/common.h @@ -177,6 +177,9 @@ typedef void (interrupt_handler_t)(void *); ({ typeof (X) __x = (X), __y = (Y); \ (__x > __y) ? __x : __y; }) +#define MIN(x, y) min(x, y) +#define MAX(x, y) max(x, y) + /** * container_of - cast a member of a structure out to the containing structure diff --git a/include/usbdcore.h b/include/usbdcore.h index cb2be72804a..206dbbc864e 100644 --- a/include/usbdcore.h +++ b/include/usbdcore.h @@ -126,14 +126,6 @@ }) #endif -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - - /* * Structure member address manipulation macros. * These are used by client code (code using the urb_link routines), since -- cgit v1.2.3