# HG changeset patch # User jlarmour # Date 1048754287 0 # Node ID 62d1a985601c60ea74c0cd04366efd0b593818d3 # Parent 02398c9e348c83ae758ef07c7aaff4e02dad47b8 * include/wallclock/wallclock.inl: Added parens to TO_BCD() and TO_DEC() macros so macro argument is interpreted correctly. diff --git a/packages/io/wallclock/current/ChangeLog b/packages/io/wallclock/current/ChangeLog --- a/packages/io/wallclock/current/ChangeLog +++ b/packages/io/wallclock/current/ChangeLog @@ -1,3 +1,8 @@ +2003-03-25 Michael Checky + + * include/wallclock/wallclock.inl: Added parens to TO_BCD() and TO_DEC() + macros so macro argument is interpreted correctly. + 2001-07-30 Jesper Skov * include/wallclock/wallclock.inl (_simple_mktime): Fix assertion diff --git a/packages/io/wallclock/current/include/wallclock/wallclock.inl b/packages/io/wallclock/current/include/wallclock/wallclock.inl --- a/packages/io/wallclock/current/include/wallclock/wallclock.inl +++ b/packages/io/wallclock/current/include/wallclock/wallclock.inl @@ -140,8 +140,8 @@ static void //----------------------------------------------------------------------------- // BCD helper macros -#define TO_BCD(x) (((x/10)<<4) | (x%10)) -#define TO_DEC(x) (((x>>4)*10) + (x&0xf)) +#define TO_BCD(x) ((((x)/10)<<4) | ((x)%10)) +#define TO_DEC(x) ((((x)>>4)*10) + ((x)&0xf)) #endif // ifndef CYGONCE_DEVS_WALLCLOCK_INL // EOF wallclock.inl