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

bcall 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 2ad42b3b30 Coverity 1544458: Uninitialized scalar variable (#11315)
2ad42b3b30 is described below

commit 2ad42b3b30d9623809a7d050ae054c1436d925f8
Author: Bryan Call <[email protected]>
AuthorDate: Sun May 5 19:03:53 2024 -0700

    Coverity 1544458: Uninitialized scalar variable (#11315)
---
 src/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc 
b/src/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc
index 3672dfff12..aef2a1f36d 100644
--- a/src/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc
+++ b/src/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc
@@ -243,10 +243,11 @@ SCENARIO("Testing NextHopRoundRobin class, using policy 
'rr-ip'", "[NextHopRound
   {
     std::shared_ptr<NextHopSelectionStrategy> strategy;
     NextHopStrategyFactory                    nhf(TS_SRC_DIR 
"/round-robin-tests.yaml");
-    strategy = nhf.strategyInstance("rr-ip");
-    sockaddr_in sa1, sa2;
-    sa1.sin_port   = 10000;
-    sa1.sin_family = AF_INET;
+    strategy        = nhf.strategyInstance("rr-ip");
+    sockaddr_in sa1 = {};
+    sockaddr_in sa2 = {};
+    sa1.sin_port    = 10000;
+    sa1.sin_family  = AF_INET;
     inet_pton(AF_INET, "192.168.1.1", &(sa1.sin_addr));
     sa2.sin_port   = 10001;
     sa2.sin_family = AF_INET;

Reply via email to