Json::array servers;
for (const ComboAddress& server : zone.d_servers) {
- servers.push_back(server.toStringWithPort()); // NOLINT: union
+ servers.push_back(server.toStringWithPort());
}
Json::array records;
if (!singleIPTarget.empty()) {
try {
ComboAddress rem(singleIPTarget);
- if (rem.sin4.sin_family != AF_INET) { // NOLINT: union
+ if (rem.sin4.sin_family != AF_INET) {
throw ApiException("");
}
- singleIPTarget = rem.toString(); // NOLINT: union
+ singleIPTarget = rem.toString();
}
catch (...) {
throw ApiException("Single IP target '" + singleIPTarget + "' is invalid");
if (!serverlist.empty()) {
serverlist += ";";
}
- serverlist += address.toStringWithPort(); // NOLINT: union
+ serverlist += address.toStringWithPort();
}
catch (const PDNSException& e) {
throw ApiException(e.reason);
const SyncRes::AuthDomain& zone = val.second;
Json::array servers;
for (const ComboAddress& server : zone.d_servers) {
- servers.push_back(server.toStringWithPort()); // NOLINT: union
+ servers.push_back(server.toStringWithPort());
}
// id is the canonical lookup key, which doesn't actually match the name (in some cases)
string zoneId = apiZoneNameToId(val.first);
for (const rcounts_t::value_type& count : rcounts) {
totIncluded -= count.first;
entries.push_back(Json::array{
- -count.first, count.second.toString()}); // NOLINT: union
+ -count.first, count.second.toString()});
if (tot++ >= 100) {
break;
}
while (!req.complete) {
auto ret = arecvtcp(data, 16384, handler, true);
if (ret == LWResult::Result::Success) {
- string str(reinterpret_cast<const char*>(data.data()), data.size()); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
+ string str(reinterpret_cast<const char*>(data.data()), data.size()); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast): safe cast, data.data() returns unsigned char *
req.complete = yarl.feed(str);
}
else {