return;
}
struct dirent* entry = nullptr;
- //NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
while ((entry = readdir(dir.get())) != nullptr) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
auto name = std::string_view(entry->d_name, strlen(entry->d_name));
if (boost::starts_with(name, "lib") &&
name.size() > 13 &&
}
struct dirent* ent = nullptr;
- while ((ent = readdir(dirp.get())) != NULL) {
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
+ while ((ent = readdir(dirp.get())) != nullptr) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
if (ent->d_name[0] == '.') {
continue;
}
}
vector<uint32_t> zoneVersions;
struct dirent* entry = nullptr;
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
while ((entry = readdir(dirHandle.get())) != nullptr) {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
continue;
}
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
zoneVersions.push_back(std::stoi(entry->d_name));
}
dirHandle.reset();
}
struct dirent* entry = nullptr;
- //NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
while ((entry = readdir(dirhdl.get())) != nullptr) {
uint32_t num = atoi(entry->d_name);
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
auto name = std::string_view(entry->d_name, strlen(entry->d_name));
if (std::to_string(num) == name) {
ret = max(num, ret);
int ret = 0;
struct dirent* entry = nullptr;
- while ((entry = readdir(dirhdl.get()))) {
+ // NOLINTNEXTLINE(concurrency-mt-unsafe): readdir is thread-safe nowadays and readdir_r is deprecated
+ while ((entry = readdir(dirhdl.get())) != nullptr) {
uint32_t num;
try {
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
pdns::checked_stoi_into(num, entry->d_name);
} catch (...) {
continue; // was not a number.
}
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
if (std::to_string(num) == entry->d_name) {
ret++;
}