From fde277a38834590ba5fc3078f9e382b89c7ce7b7 Mon Sep 17 00:00:00 2001 From: Stefan Kolb Date: Wed, 9 Mar 2016 07:24:16 -0600 Subject: [PATCH] Missing parentheses in MSEC2TICK macro can lead to incorrect conversions --- arch | 2 +- configs | 2 +- include/nuttx/clock.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch b/arch index 84aade6ed5..0147de5a24 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 84aade6ed5dcc6fe8df0afb7cb0fc157e128c6bc +Subproject commit 0147de5a248d7ba7be9d5dbd7addbe4aeae6088c diff --git a/configs b/configs index b2be018b28..82e6f02229 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit b2be018b284cdaaf192afd6b61dfcd4dce065b73 +Subproject commit 82e6f022294752fcbdd71e282c493eba20751732 diff --git a/include/nuttx/clock.h b/include/nuttx/clock.h index c0fcc35b75..a844396b30 100644 --- a/include/nuttx/clock.h +++ b/include/nuttx/clock.h @@ -157,7 +157,7 @@ #if (MSEC_PER_TICK * USEC_PER_MSEC) == USEC_PER_TICK # define MSEC2TICK(msec) (((msec)+(MSEC_PER_TICK/2))/MSEC_PER_TICK) /* Rounds */ #else -# define MSEC2TICK(msec) USEC2TICK(msec * 1000) /* Rounds */ +# define MSEC2TICK(msec) USEC2TICK((msec) * USEC_PER_MSEC) /* Rounds */ #endif #define DSEC2TICK(dsec) MSEC2TICK((dsec) * MSEC_PER_DSEC) /* Rounds */