This is an automated email from the ASF dual-hosted git repository.

dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 326673b735 Coverity: Fix for CID-1523671 (#11877)
326673b735 is described below

commit 326673b7351a83634e36618b3387d5c9a156910f
Author: Damian Meden <[email protected]>
AuthorDate: Mon Nov 18 21:59:56 2024 +0100

    Coverity: Fix for CID-1523671 (#11877)
---
 plugins/esi/test/utils_test.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/esi/test/utils_test.cc b/plugins/esi/test/utils_test.cc
index 38821bdb15..9d899da54c 100644
--- a/plugins/esi/test/utils_test.cc
+++ b/plugins/esi/test/utils_test.cc
@@ -122,7 +122,8 @@ TEST_CASE("esi utils test")
     Utils::KeyValueMap     kv;
     Utils::HeaderValueList list;
     Utils::parseKeyValueConfig(lines, kv, list);
-    REQUIRE(kv.find("a")->second == "b");
+    const auto b = kv.find("a");
+    REQUIRE((b != std::end(kv) && b->second == "b"));
     REQUIRE(list.back() == "GRADE");
     list.pop_back();
     REQUIRE(list.back() == "AGE");

Reply via email to