From 174020545f4539b2174200e1544bd0daa797e35b Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 23 Oct 2010 15:16:17 +0100 Subject: [PATCH] rx: Fix bracing on rx_clock macro arguments Add brackets around the arguments in the clock helper macros, so that these can be called with more complex parameters. Reviewed-on: http://gerrit.openafs.org/3030 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit da18ca41751b43576f6652a16f69260e0c6ac0d6) Change-Id: Ie560d081e160ec1518c6d3fd307455ae8d219651 Reviewed-on: http://gerrit.openafs.org/3128 Tested-by: Derrick Brashear --- src/rx/rx_clock.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rx/rx_clock.h b/src/rx/rx_clock.h index 049d00229..dd2ee0f1b 100644 --- a/src/rx/rx_clock.h +++ b/src/rx/rx_clock.h @@ -135,10 +135,10 @@ extern int clock_nUpdates; (c1)->sec += (c2)->sec; \ END -#define USEC(cp) ((cp->sec * 1000000) + cp->usec) -#define MSEC(cp) ((cp->sec * 1000) + (cp->usec / 1000)) -#define _4THMSEC(cp) ((cp->sec * 4000) + (cp->usec / 250)) -#define _8THMSEC(cp) ((cp->sec * 8000) + (cp->usec / 125)) +#define USEC(cp) (((cp)->sec * 1000000) + (cp)->usec) +#define MSEC(cp) (((cp)->sec * 1000) + ((cp)->usec / 1000)) +#define _4THMSEC(cp) (((cp)->sec * 4000) + ((cp)->usec / 250)) +#define _8THMSEC(cp) (((cp)->sec * 8000) + ((cp)->usec / 125)) /* Add ms milliseconds to time c1. Both ms and c1 must be positive */ #define clock_Addmsec(c1, ms) \ -- 2.39.5