Skip to content

Commit

Permalink
fix const issue
Browse files Browse the repository at this point in the history
  • Loading branch information
egecetin committed Jan 4, 2025
1 parent 90cf3f0 commit 48e0956
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Packet++/src/NtpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,13 @@ namespace pcpp
double const fractionPart = modf(timestamp, &integerPart);

struct tm* timer = nullptr;
time_t const timeStruct = integerPart;
#if defined(_WIN32)
time_t timeStruct = integerPart;
if (timeStruct < 0)
timeStruct = 0;
timer = gmtime(&timeStruct);
#else
time_t const timeStruct = integerPart;
struct tm timer_r{};
timer = gmtime_r(&timeStruct, &timer_r);

Expand Down

0 comments on commit 48e0956

Please sign in to comment.