Commit f36e82c0 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

dvb/si/tdt: Fix tdt_get_utc() function.

Due to missing casts the function is not returning correctly the top
8 bits (32-40) of UTC_time field.
parent 756050b9
...@@ -66,8 +66,8 @@ static inline void tdt_set_utc(uint8_t *p_tdt, uint64_t i_utc) ...@@ -66,8 +66,8 @@ static inline void tdt_set_utc(uint8_t *p_tdt, uint64_t i_utc)
static inline uint64_t tdt_get_utc(const uint8_t *p_tdt) static inline uint64_t tdt_get_utc(const uint8_t *p_tdt)
{ {
return ((uint64_t)p_tdt[3] << 32) | (p_tdt[4] << 24) | (p_tdt[5] << 16) return (uint64_t)(((uint64_t)p_tdt[3] << 32) | ((uint64_t)p_tdt[4] << 24) |
| (p_tdt[6] << 8) | p_tdt[7]; ((uint64_t)p_tdt[5] << 16) | ((uint64_t)p_tdt[6] << 8) | p_tdt[7]);
} }
static inline bool tdt_validate(const uint8_t *p_tdt) static inline bool tdt_validate(const uint8_t *p_tdt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment