Skip to content

Commit f1f82a8

Browse files
Flavio Ceolinandrewboie
authored andcommitted
sys_clock: Explicitly set constants sign
Explicitly setting these constants as unsigned. MISRA rule 10.8 Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 4f60201 commit f1f82a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/sys_clock.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ static inline int sys_clock_hw_cycles_per_tick(void)
6262
#endif
6363

6464
/* number of nsec per usec */
65-
#define NSEC_PER_USEC 1000
65+
#define NSEC_PER_USEC 1000U
6666

6767
/* number of microseconds per millisecond */
68-
#define USEC_PER_MSEC 1000
68+
#define USEC_PER_MSEC 1000U
6969

7070
/* number of milliseconds per second */
71-
#define MSEC_PER_SEC 1000
71+
#define MSEC_PER_SEC 1000U
7272

7373
/* number of microseconds per second */
7474
#define USEC_PER_SEC ((USEC_PER_MSEC) * (MSEC_PER_SEC))

0 commit comments

Comments
 (0)