coap_time.h: cast COAP_TICKS_PER_SECOND to coap_tick_t for type safety

CID 1458396 detected by Coverity scan points out that integer
arithmetics may lead to an overflow without the typecast to
coap_tick_t.
This commit is contained in:
Olaf Bergmann committed 2017-11-03 14:29:49 +01:00
1 parent 4b52182b8d
commit a569e16584
1 file changed
+1 -1
+1 -1
View File
@@ -97,7 +97,7 @@ typedef time_t coap_time_t;
typedef int64_t coap_tick_diff_t;
/** Use ms resolution on POSIX systems */
#define COAP_TICKS_PER_SECOND 1000
#define COAP_TICKS_PER_SECOND ((coap_tick_t)(1000U))
/**
* Initializes the internal clock.