From e47db3deb6d8d5701aa69dbfd9cc2db8bb398159 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sun, 27 Mar 2016 02:23:06 +0000 Subject: [PATCH] Fixed side-effects bugs. FossilOrigin-Name: 6b939062f9b8cd4d1a3833a77297033bd2a6cd30ef8ea6fa5fb5e83f400d378f --- src/cw/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cw/timer.h b/src/cw/timer.h index 66cbb8b6..5a8470aa 100644 --- a/src/cw/timer.h +++ b/src/cw/timer.h @@ -46,14 +46,14 @@ typedef time_t cw_timer_t; * } * @endcode */ -#define cw_timer_start(t) (time(NULL)+t) +#define cw_timer_start(t) (time(NULL)+(t)) /** * Check if a timer is expired. * @param t a variable of type #cw_timer_t intialized by #cw_timer_start * @return 0=timer is not expired\n 1=timer is expired. */ -#define cw_timer_timeout(t) (time(NULL)>t ? 1 : 0) +#define cw_timer_timeout(t) (time(NULL)>(t) ? 1 : 0) /** * Get the number of nano seconds from a timeval.