]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/misc.cc
Apply suggestions from Fred's review (thanks!)
[thirdparty/pdns.git] / pdns / misc.cc
index 6e98949bedda7489dc2cb8846e4a53f03e9ba3fa..bb5464f286be964696a41fbc0cb09ca103af514c 100644 (file)
@@ -1377,15 +1377,15 @@ DNSName getTSIGAlgoName(TSIGHashEnum& algoEnum)
 uint64_t getOpenFileDescriptors(const std::string&)
 {
 #ifdef __linux__
-  auto dirhdl = std::unique_ptr<DIR, decltype(&closedir)>(opendir(("/proc/"+std::to_string(getpid())+"/fd/").c_str()), closedir);
-  if (!dirhdl) {
+  auto dirHandle = std::unique_ptr<DIR, decltype(&closedir)>(opendir(("/proc/"+std::to_string(getpid())+"/fd/").c_str()), closedir);
+  if (!dirHandle) {
     return 0;
   }
 
   int ret = 0;
   struct dirent* entry = nullptr;
   // NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
-  while ((entry = readdir(dirhdl.get())) != nullptr) {
+  while ((entry = readdir(dirHandle.get())) != nullptr) {
     uint32_t num;
     try {
       // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is