From: Simon Wilkinson Date: Sat, 23 Oct 2010 14:16:17 +0000 (+0100) Subject: rx: Fix bracing on rx_clock macro arguments X-Git-Tag: openafs-devel-1_5_78~43 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=174020545f4539b2174200e1544bd0daa797e35b;p=packages%2Fo%2Fopenafs.git 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 --- 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) \