minval/maxval macro operators precedence fix. Thanks Luis Jim?nez.
--- a/drivers/timers_unix/timers_unix.c Thu Aug 31 10:28:53 2006 +0200
+++ b/drivers/timers_unix/timers_unix.c Wed Nov 29 15:51:15 2006 +0100
@@ -81,7 +81,7 @@
pthread_join(*Thread, NULL);
}
-#define maxval(a,b) a>b?a:b
+#define maxval(a,b) ((a>b)?a:b)
void setTimer(TIMEVAL value)
{
// printf("setTimer(TIMEVAL value=%d)\n", value);
--- a/src/timer.c Thu Aug 31 10:28:53 2006 +0200
+++ b/src/timer.c Wed Nov 29 15:51:15 2006 +0100
@@ -32,7 +32,7 @@
TIMEVAL total_sleep_time = TIMEVAL_MAX;
TIMER_HANDLE last_timer_raw = -1;
-#define minval(a,b) a<b?a:b
+#define minval(a,b) ((a<b)?a:b)
// --------- Use this to declare a new alarm ---------
TIMER_HANDLE SetAlarm(CO_Data* d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)