Skip to content

Commit e82d127

Browse files
committed
Address review comments
1 parent d21e916 commit e82d127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/core_sntp_serializer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,13 +832,13 @@ SntpStatus_t Sntp_ConvertToUnixTime( const SntpTimestamp_t * pSntpTime,
832832
* +
833833
* Sntp Time since Era 1 Epoch
834834
*/
835-
*pUnixTimeSecs = ( UnixTime_t ) ( UNIX_TIME_SECS_AT_SNTP_ERA_1_SMALLEST_TIME + pSntpTime->seconds );
835+
*pUnixTimeSecs = ( UnixTime_t ) ( UNIX_TIME_SECS_AT_SNTP_ERA_1_SMALLEST_TIME + ( UnixTime_t ) ( pSntpTime->seconds ) );
836836
}
837837

838838
/* Handle case when SNTP timestamp is in SNTP era 1 time range. */
839839
if( pSntpTime->seconds >= SNTP_TIME_AT_UNIX_EPOCH_SECS )
840840
{
841-
*pUnixTimeSecs = ( UnixTime_t ) ( pSntpTime->seconds - SNTP_TIME_AT_UNIX_EPOCH_SECS );
841+
*pUnixTimeSecs = ( UnixTime_t ) ( ( UnixTime_t ) ( pSntpTime->seconds ) - SNTP_TIME_AT_UNIX_EPOCH_SECS );
842842
}
843843

844844
/* Convert SNTP fractions to microseconds for UNIX time. */

0 commit comments

Comments
 (0)