From 78acb9cec0a8105d8f626d40b891b47fb06b6578 Mon Sep 17 00:00:00 2001 From: Piotrek Zadroga Date: Fri, 20 Oct 2023 14:06:23 +0200 Subject: [PATCH] [#3119] static cast time_t to uint32 --- src/bin/perfdhcp/random_number_generator.h | 2 +- src/lib/dhcpsrv/csv_lease_file6.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/perfdhcp/random_number_generator.h b/src/bin/perfdhcp/random_number_generator.h index ce5a386364..43a9ad6800 100644 --- a/src/bin/perfdhcp/random_number_generator.h +++ b/src/bin/perfdhcp/random_number_generator.h @@ -67,7 +67,7 @@ public: } // Init with the current time - rng_.seed(time(NULL)); + rng_.seed(time(0)); } /// \brief Generate uniformly distributed integer diff --git a/src/lib/dhcpsrv/csv_lease_file6.cc b/src/lib/dhcpsrv/csv_lease_file6.cc index 22608cb7ef..b26f1ba4d5 100644 --- a/src/lib/dhcpsrv/csv_lease_file6.cc +++ b/src/lib/dhcpsrv/csv_lease_file6.cc @@ -221,7 +221,7 @@ CSVLeaseFile6::readCltt(const CSVRow& row) { time_t cltt = static_cast(row.readAndConvertAt(getColumnIndex("expire")) - readValid(row)); - return (cltt); + return (static_cast(cltt)); } SubnetID