mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Missing parentheses in MSEC2TICK macro can lead to incorrect conversions
This commit is contained in:
committed by
Gregory Nutt
parent
fea11c002a
commit
fde277a388
+1
-1
Submodule arch updated: 84aade6ed5...0147de5a24
+1
-1
Submodule configs updated: b2be018b28...82e6f02229
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user