You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/11/10 17:32:23 UTC
[incubator-nuttx] branch master updated: clock.h: Remove the
unnecessary L from macro
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 69d3545 clock.h: Remove the unnecessary L from macro
69d3545 is described below
commit 69d35455c7780fbf082cc2322b2aeada9ba669ff
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Nov 8 22:37:50 2021 +0800
clock.h: Remove the unnecessary L from macro
It's safe for the number <= 32767 since C standard require int at least 16bit
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
include/nuttx/clock.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/nuttx/clock.h b/include/nuttx/clock.h
index 7790f68..55e49c6 100644
--- a/include/nuttx/clock.h
+++ b/include/nuttx/clock.h
@@ -84,32 +84,32 @@
#define NSEC_PER_SEC 1000000000L /* Seconds */
#define USEC_PER_SEC 1000000L
-#define MSEC_PER_SEC 1000L
-#define DSEC_PER_SEC 10L
-#define HSEC_PER_SEC 2L
+#define MSEC_PER_SEC 1000
+#define DSEC_PER_SEC 10
+#define HSEC_PER_SEC 2
#define NSEC_PER_HSEC 500000000L /* Half seconds */
#define USEC_PER_HSEC 500000L
-#define MSEC_PER_HSEC 500L
-#define DSEC_PER_HSEC 5L
+#define MSEC_PER_HSEC 500
+#define DSEC_PER_HSEC 5
#define NSEC_PER_DSEC 100000000L /* Deciseconds */
#define USEC_PER_DSEC 100000L
-#define MSEC_PER_DSEC 100L
+#define MSEC_PER_DSEC 100
#define NSEC_PER_MSEC 1000000L /* Milliseconds */
-#define USEC_PER_MSEC 1000L
+#define USEC_PER_MSEC 1000
-#define NSEC_PER_USEC 1000L /* Microseconds */
+#define NSEC_PER_USEC 1000 /* Microseconds */
-#define SEC_PER_MIN 60L
+#define SEC_PER_MIN 60
#define NSEC_PER_MIN (NSEC_PER_SEC * SEC_PER_MIN)
#define USEC_PER_MIN (USEC_PER_SEC * SEC_PER_MIN)
#define MSEC_PER_MIN (MSEC_PER_SEC * SEC_PER_MIN)
#define DSEC_PER_MIN (DSEC_PER_SEC * SEC_PER_MIN)
#define HSEC_PER_MIN (HSEC_PER_SEC * SEC_PER_MIN)
-#define MIN_PER_HOUR 60L
+#define MIN_PER_HOUR 60
#define NSEC_PER_HOUR (NSEC_PER_MIN * MIN_PER_HOUR)
#define USEC_PER_HOUR (USEC_PER_MIN * MIN_PER_HOUR)
#define MSEC_PER_HOUR (MSEC_PER_MIN * MIN_PER_HOUR)
@@ -117,7 +117,7 @@
#define HSEC_PER_HOUR (HSEC_PER_MIN * MIN_PER_HOUR)
#define SEC_PER_HOUR (SEC_PER_MIN * MIN_PER_HOUR)
-#define HOURS_PER_DAY 24L
+#define HOURS_PER_DAY 24
#define SEC_PER_DAY (HOURS_PER_DAY * SEC_PER_HOUR)
/* If CONFIG_SCHED_TICKLESS is not defined, then the interrupt interval of