Commit a90b6b00 authored by Brian Norris's avatar Brian Norris Committed by Zhang Rui

tools/thermal: tmon: add min/max macros

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Acked-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 4cc32cb4
......@@ -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;
......
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