lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424225916-13488-3-git-send-email-computersforpeace@gmail.com>
Date:	Tue, 17 Feb 2015 18:18:30 -0800
From:	Brian Norris <computersforpeace@...il.com>
To:	Zhang Rui <rui.zhang@...el.com>, <jacob.jun.pan@...ux.intel.com>
Cc:	Neil Horman <nhorman@...driver.com>,
	Brian Norris <computersforpeace@...il.com>,
	Javi Merino <javi.merino@....com>,
	Florian Fainelli <f.fainelli@...il.com>,
	<linux-kernel@...r.kernel.org>, <linux-pm@...r.kernel.org>
Subject: [PATCH 2/8] tools/thermal: tmon: add min/max macros

Signed-off-by: Brian Norris <computersforpeace@...il.com>
---
 tools/thermal/tmon/tui.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c
index 89f8ef0e15c8..43c5aecf71da 100644
--- 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;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ