From: Jamie (Bear) Murphy <1613241+ITJamie@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:41:27 +0000 (+0100) Subject: Update pdns/zoneparser-tng.cc X-Git-Tag: rec-5.4.0-alpha0~23^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15854%2Fhead;p=thirdparty%2Fpdns.git Update pdns/zoneparser-tng.cc Co-authored-by: Miod Vallat Signed-off-by: Jamie (Bear) Murphy <1613241+ITJamie@users.noreply.github.com> --- 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()) {