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: upstream/1.8.0_pre1^2~4631 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=da18ca41751b43576f6652a16f69260e0c6ac0d6;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. Change-Id: I09b333dcde96ef56fab8d5ada89eb0744cdb1690 Reviewed-on: http://gerrit.openafs.org/3030 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- 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) \