]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Fix bracing on rx_clock macro arguments
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 23 Oct 2010 14:16:17 +0000 (15:16 +0100)
committerDerrick Brashear <shadow@dementia.org>
Tue, 26 Oct 2010 02:23:54 +0000 (19:23 -0700)
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 <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit da18ca41751b43576f6652a16f69260e0c6ac0d6)
Change-Id: Ie560d081e160ec1518c6d3fd307455ae8d219651
Reviewed-on: http://gerrit.openafs.org/3128
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx_clock.h

index 049d002292a837c86bec64227b1d565ab25b5b2a..dd2ee0f1b73957055f087c16b7a40585b4f59ba9 100644 (file)
@@ -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)                                    \