From 991f2724a675cd9cd96b4db5784cbd4b7861f431 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 1 Mar 2021 11:10:02 +0100 Subject: [PATCH] fix --- cube/User/Src/networkAbstractionLayer_lan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cube/User/Src/networkAbstractionLayer_lan.c b/cube/User/Src/networkAbstractionLayer_lan.c index e5d5517..0342a4c 100644 --- a/cube/User/Src/networkAbstractionLayer_lan.c +++ b/cube/User/Src/networkAbstractionLayer_lan.c @@ -147,8 +147,8 @@ void networkSntpEngine(void *handle) { srcAddr[0], srcAddr[1], srcAddr[2], srcAddr[3], srcPort); coloredMsg(LOG_BLUE, "nes, received in the %d. cycles", localHandle->retryCount); - localHandle->seconds = localHandle->ntpMsg.xmt_h - UNIX_NTP_EPOCH_DIFF; - coloredMsg(LOG_BLUE, "nes, seconds: %lu", localHandle->seconds); + localHandle->seconds = ((uint64_t)localHandle->ntpMsg.xmt_h) - UNIX_NTP_EPOCH_DIFF; + coloredMsg(LOG_BLUE, "nes, seconds: %llu", localHandle->seconds); localHandle->sntpState = SNTP_STATE_DONE; } else { coloredMsg(LOG_BLUE, "nes, invalid number of octets received: %d", recvLen);