Mercurial > ecos
changeset 874:62d1a985601c
* include/wallclock/wallclock.inl: Added parens to TO_BCD() and TO_DEC()
macros so macro argument is interpreted correctly.
| author | jlarmour |
|---|---|
| date | Thu, 27 Mar 2003 08:38:07 +0000 |
| parents | 02398c9e348c |
| children | b17faf385ee0 |
| files | packages/io/wallclock/current/ChangeLog packages/io/wallclock/current/include/wallclock/wallclock.inl |
| diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/wallclock/current/ChangeLog +++ b/packages/io/wallclock/current/ChangeLog @@ -1,3 +1,8 @@ +2003-03-25 Michael Checky <Michael_Checky@Thermoking.com> + + * include/wallclock/wallclock.inl: Added parens to TO_BCD() and TO_DEC() + macros so macro argument is interpreted correctly. + 2001-07-30 Jesper Skov <jskov@redhat.com> * include/wallclock/wallclock.inl (_simple_mktime): Fix assertion
--- 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
