mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00
sntp: revert 2 -Wconversion changes (see bug #51538)
This commit is contained in:
parent
db3a4e3158
commit
0853d1e7d1
@ -112,7 +112,7 @@
|
|||||||
#define SNTP_OFFSET_TRANSMIT_TIME 40
|
#define SNTP_OFFSET_TRANSMIT_TIME 40
|
||||||
|
|
||||||
/* Number of seconds between 1970 and Feb 7, 2036 06:28:16 UTC (epoch 1) */
|
/* Number of seconds between 1970 and Feb 7, 2036 06:28:16 UTC (epoch 1) */
|
||||||
#define DIFF_SEC_1970_2036 ((s32_t)2085978496L)
|
#define DIFF_SEC_1970_2036 ((u32_t)2085978496L)
|
||||||
|
|
||||||
/** Convert NTP timestamp fraction to microseconds.
|
/** Convert NTP timestamp fraction to microseconds.
|
||||||
*/
|
*/
|
||||||
@ -270,7 +270,7 @@ static const char *
|
|||||||
sntp_format_time(s32_t sec)
|
sntp_format_time(s32_t sec)
|
||||||
{
|
{
|
||||||
time_t ut;
|
time_t ut;
|
||||||
ut = (time_t)((time_t)sec + (time_t)DIFF_SEC_1970_2036);
|
ut = (u32_t)((u32_t)sec + DIFF_SEC_1970_2036);
|
||||||
return ctime(&ut);
|
return ctime(&ut);
|
||||||
}
|
}
|
||||||
#endif /* LWIP_DEBUG && !sntp_format_time */
|
#endif /* LWIP_DEBUG && !sntp_format_time */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user