public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* [issue 1000636] tidy tm_basic max macro
@ 2008-11-14 14:10 Jonathan Larmour
  2008-11-14 14:30 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Larmour @ 2008-11-14 14:10 UTC (permalink / raw)
  To: ecos-patches

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.144
diff -u -5 -p -r1.144 ChangeLog
--- ChangeLog	15 Sep 2007 14:42:39 -0000	1.144
+++ ChangeLog	14 Nov 2008 14:09:32 -0000
@@ -1,5 +1,10 @@
+2008-11-14  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* tests/tm_basic.cxx (max): Resolve issue 1000636 with extra
+	bracketing.
+
 2007-08-23  Hans Rosenfeld  <rosenfeld@grumpf.hope-2000.org>
 
 	* tests/intr0.cxx, tests/kintr0.c: As suggested by Bart Veer,
 	priorities of the interrupts created by intr0 and kintr0 can now
 	be overridden by the HAL through HAL_INTR_TEST_PRIO_x constants.
Index: tests/tm_basic.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/tm_basic.cxx,v
retrieving revision 1.23
diff -u -5 -p -r1.23 tm_basic.cxx
--- tests/tm_basic.cxx	8 Jan 2007 16:20:14 -0000	1.23
+++ tests/tm_basic.cxx	14 Nov 2008 14:09:33 -0000
@@ -208,11 +208,11 @@ void run_semaphore_circuit_test(void);
 void run_counter_tests(void);
 void run_flag_tests(void);
 void run_alarm_tests(void);
 
 #ifndef max
-#define max(n,m) (m > n ? n : m)
+#define max(n,m) ((m) > (n) ? (n) : (m))
 #endif
 
 // Wait until a clock tick [real time clock] has passed.  This should keep it
 // from happening again during a measurement, thus minimizing any fluctuations
 void

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-14 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-14 14:10 [issue 1000636] tidy tm_basic max macro Jonathan Larmour
2008-11-14 14:30 ` Gary Thomas
2008-11-14 15:31   ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).