Skip to content

Commit

Permalink
use 0 instead of NAN
Browse files Browse the repository at this point in the history
  • Loading branch information
egecetin committed Jan 4, 2025
1 parent 48e0956 commit e187ec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Packet++/src/NtpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ namespace pcpp

uint64_t NtpLayer::convertToTimestampFormat(const double val)
{
double integerPart = NAN;
double integerPart = 0;
double const fractionPart = modf(val, &integerPart);

// Cast values to 32bit
Expand All @@ -594,7 +594,7 @@ namespace pcpp

std::string NtpLayer::convertToIsoFormat(const double timestamp)
{
double integerPart = NAN;
double integerPart = 0;
double const fractionPart = modf(timestamp, &integerPart);

struct tm* timer = nullptr;
Expand Down

0 comments on commit e187ec9

Please sign in to comment.