From 3d8a0b792d9ac9cca1cae7ddc2c51534b1d74c7e Mon Sep 17 00:00:00 2001 From: "Jamie (Bear) Murphy" <1613241+ITJamie@users.noreply.github.com> Date: Wed, 16 Jul 2025 15:41:27 +0100 Subject: [PATCH] Update pdns/zoneparser-tng.cc Co-authored-by: Miod Vallat Signed-off-by: Jamie (Bear) Murphy <1613241+ITJamie@users.noreply.github.com> --- pdns/zoneparser-tng.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pdns/zoneparser-tng.cc b/pdns/zoneparser-tng.cc index c15e03ec64..e004e3f211 100644 --- a/pdns/zoneparser-tng.cc +++ b/pdns/zoneparser-tng.cc @@ -369,8 +369,7 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment) else if(pdns_iequals(command,"$INCLUDE") && d_parts.size() > 1 && d_fromfile) { string fname=unquotify(makeString(d_line, d_parts[1])); // Find the first semicolon and remove everything after it, including the semicolon - size_t semicolon_pos = fname.find(';'); - if (semicolon_pos != string::npos) { + if (auto semicolon_pos = fname.find(';'); semicolon_pos != string::npos) { fname.resize(semicolon_pos); } if (!fname.empty() && fname[0] != '/' && !d_reldir.empty()) { -- 2.47.2