From e478f00cebaae36355bb01e429a730cea80a9c02 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 1 Mar 2021 11:37:53 +0100 Subject: [PATCH] x --- cube/User/Src/networkAbstractionLayer_lan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cube/User/Src/networkAbstractionLayer_lan.c b/cube/User/Src/networkAbstractionLayer_lan.c index ea2c9ba..36350eb 100644 --- a/cube/User/Src/networkAbstractionLayer_lan.c +++ b/cube/User/Src/networkAbstractionLayer_lan.c @@ -151,7 +151,8 @@ void networkSntpEngine(void *handle) { srcPort); coloredMsg(LOG_BLUE, "nes, received in the %d. cycles", localHandle->retryCount); - localHandle->seconds = ((uint64_t)localHandle->ntpMsg.s.xmt_h) - UNIX_NTP_EPOCH_DIFF; + uint32_t xmt_h = localHandle->ntpMsg.s.xmt_h; + localHandle->seconds = ((uint64_t)xmt_h) - UNIX_NTP_EPOCH_DIFF; coloredMsg(LOG_BLUE, "nes, xmt: %08x", localHandle->ntpMsg.s.xmt_h); coloredMsg(LOG_BLUE, "nes, seconds: %lu", localHandle->seconds); localHandle->sntpState = SNTP_STATE_DONE;