Commit 72386e17 authored by Mike Gabriel's avatar Mike Gabriel

hw/nxagent/Screen.c: Correctly use already defined MIN/MAX macros.

Use MIN(A,B) macro as defined in Utils.h. Add MAX(A,B) macro in Utils.h, as well. Don't have another set of MIN/MAX macro definitions in Screen.c. Amends the following compiler warnings: ``` Screen.c:3600:0: warning: "MIN" redefined #define MIN(a,b) ((a) < (b)) ? (a) : (b); ^ In file included from Screen.c:78:0: Utils.h:36:0: note: this is the location of the previous definition #define MIN(A, B) ( (A) < (B) ? (A) : (B) ) ^ ```
parent 7d3d47f1
......@@ -3595,10 +3595,6 @@ Bool nxagentReconnectScreen(void *p0)
return True;
}
/* FIXME: there must be such macros somewhere already...*/
#define MAX(a,b) ((a) > (b)) ? (a) : (b);
#define MIN(a,b) ((a) < (b)) ? (a) : (b);
/* intersect two rectangles */
Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah,
int bx1, int by1, unsigned int bw, unsigned int bh,
......
......@@ -36,4 +36,8 @@
#define MIN(A, B) ( (A) < (B) ? (A) : (B) )
#endif
#ifndef MAX
#define MAX(A, B) ( (A) > (B) ? (A) : (B) );
#endif
#endif /* __Utils_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment