projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cc32cb
)
tools/thermal: tmon: add min/max macros
author
Brian Norris
<
[email protected]
>
Wed, 18 Feb 2015 02:18:30 +0000
(18:18 -0800)
committer
Zhang Rui
<
[email protected]
>
Sat, 28 Feb 2015 05:52:47 +0000
(13:52 +0800)
Signed-off-by: Brian Norris <
[email protected]
>
Acked-by: Jacob Pan <
[email protected]
>
Reviewed-by: Florian Fainelli <
[email protected]
>
Signed-off-by: Zhang Rui <
[email protected]
>
tools/thermal/tmon/tui.c
patch
|
blob
|
history
diff --git
a/tools/thermal/tmon/tui.c
b/tools/thermal/tmon/tui.c
index 89f8ef0e15c810936737a51f49f1a87f1f2c5648..43c5aecf71daf51a833947726e290c9044de84e4 100644
(file)
--- a/
tools/thermal/tmon/tui.c
+++ b/
tools/thermal/tmon/tui.c
@@
-30,6
+30,18
@@
#include "tmon.h"
+#define min(x, y) ({ \
+ typeof(x) _min1 = (x); \
+ typeof(y) _min2 = (y); \
+ (void) (&_min1 == &_min2); \
+ _min1 < _min2 ? _min1 : _min2; })
+
+#define max(x, y) ({ \
+ typeof(x) _max1 = (x); \
+ typeof(y) _max2 = (y); \
+ (void) (&_max1 == &_max2); \
+ _max1 > _max2 ? _max1 : _max2; })
+
static PANEL *data_panel;
static PANEL *dialogue_panel;
static PANEL *top;