]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Coverity:
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 1 Apr 2022 10:23:59 +0000 (12:23 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 1 Apr 2022 10:30:21 +0000 (12:30 +0200)
1487562 Uninitialized scalar variable
1469603 Uninitialized scalar field
1446991 Uninitialized scalar field

pdns/recursordist/rec-main.cc
pdns/syncres.hh

index 22946968c70bffd6336de832255b968d377e1e09..ada446c3e09ac01525913bb96c1772f31dbfe127 100644 (file)
@@ -2270,7 +2270,6 @@ int main(int argc, char** argv)
 {
   g_argc = argc;
   g_argv = argv;
-  g_stats.startupTime = time(0);
   Utility::srandom();
   versionSetProduct(ProductRecursor);
   reportBasicTypes();
index 95f11317325a295025ae340ae7cb4ffce46b0211..1e37dc66558907db6577f56224c4e69df79df11d 100644 (file)
@@ -904,8 +904,8 @@ struct PacketID
   bool inIncompleteOkay{false};
   uint16_t id{0};  // wait for a specific id/remote pair
   uint16_t type{0};             // and this is its type
-  TCPAction highState;
-  IOState lowState;
+  TCPAction highState{TCPAction::DoingRead};
+  IOState lowState{IOState::NeedRead};
 
   bool operator<(const PacketID& b) const
   {
@@ -1003,7 +1003,7 @@ struct RecursorStats
   pdns::stat_t noPacketError;
   pdns::stat_t ignoredCount;
   pdns::stat_t emptyQueriesCount;
-  time_t startupTime;
+  time_t startupTime{time(nullptr)};
   pdns::stat_t dnssecQueries;
   pdns::stat_t dnssecAuthenticDataQueries;
   pdns::stat_t dnssecCheckDisabledQueries;
@@ -1149,7 +1149,7 @@ extern __thread struct timeval g_now;
 
 struct ThreadTimes
 {
-  uint64_t msec;
+  uint64_t msec{0};
   vector<uint64_t> times;
   ThreadTimes& operator+=(const ThreadTimes& rhs)
   {