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 88d17d8697 Coverity. CID-1559195: Fix for uninitialized scalar field.
(#11807)
88d17d8697 is described below
commit 88d17d8697a3eb3a0794cad79532ad66890e062b
Author: Damian Meden <[email protected]>
AuthorDate: Tue Oct 15 10:23:09 2024 +0200
Coverity. CID-1559195: Fix for uninitialized scalar field. (#11807)
---
include/proxy/http/remap/RemapConfig.h | 8 ++++++--
include/proxy/http/remap/UrlRewrite.h | 6 +-----
src/proxy/http/remap/UrlRewrite.cc | 1 -
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/include/proxy/http/remap/RemapConfig.h
b/include/proxy/http/remap/RemapConfig.h
index 024a86142b..b5259b60f7 100644
--- a/include/proxy/http/remap/RemapConfig.h
+++ b/include/proxy/http/remap/RemapConfig.h
@@ -26,7 +26,6 @@
#include "proxy/http/remap/AclFiltering.h"
class UrlRewrite;
-enum class ACLBehaviorPolicy;
#define BUILD_TABLE_MAX_ARGS 2048
@@ -46,6 +45,11 @@ enum class ACLBehaviorPolicy;
#define REMAP_OPTFLG_ALL_FILTERS \
(REMAP_OPTFLG_METHOD | REMAP_OPTFLG_SRC_IP | REMAP_OPTFLG_SRC_IP_CATEGORY |
REMAP_OPTFLG_ACTION | REMAP_OPTFLG_INTERNAL)
+enum class ACLBehaviorPolicy {
+ ACL_BEHAVIOR_LEGACY = 0,
+ ACL_BEHAVIOR_MODERN,
+};
+
struct BUILD_TABLE_INFO {
BUILD_TABLE_INFO();
~BUILD_TABLE_INFO();
@@ -56,7 +60,7 @@ struct BUILD_TABLE_INFO {
char *paramv[BUILD_TABLE_MAX_ARGS];
char *argv[BUILD_TABLE_MAX_ARGS];
- ACLBehaviorPolicy behavior_policy;
+ ACLBehaviorPolicy behavior_policy{ACLBehaviorPolicy::ACL_BEHAVIOR_LEGACY};
// Default 0.
bool ip_allow_check_enabled_p = true;
bool accept_check_p = true;
diff --git a/include/proxy/http/remap/UrlRewrite.h
b/include/proxy/http/remap/UrlRewrite.h
index b32841fd57..b58dc9092d 100644
--- a/include/proxy/http/remap/UrlRewrite.h
+++ b/include/proxy/http/remap/UrlRewrite.h
@@ -32,6 +32,7 @@
#include "tsutil/Regex.h"
#include "proxy/http/remap/PluginFactory.h"
#include "proxy/http/remap/NextHopStrategyFactory.h"
+#include "proxy/http/remap/RemapConfig.h"
#include <memory>
@@ -54,11 +55,6 @@ enum mapping_type {
NONE
};
-enum class ACLBehaviorPolicy {
- ACL_BEHAVIOR_LEGACY = 0,
- ACL_BEHAVIOR_MODERN,
-};
-
/**
*
**/
diff --git a/src/proxy/http/remap/UrlRewrite.cc
b/src/proxy/http/remap/UrlRewrite.cc
index 91d990beda..22e2fd3e16 100644
--- a/src/proxy/http/remap/UrlRewrite.cc
+++ b/src/proxy/http/remap/UrlRewrite.cc
@@ -25,7 +25,6 @@
#include "proxy/http/remap/UrlRewrite.h"
#include "iocore/eventsystem/ConfigProcessor.h"
#include "proxy/ReverseProxy.h"
-#include "proxy/http/remap/RemapConfig.h"
#include "tscore/Layout.h"
#include "tscore/Filenames.h"
#include "proxy/http/HttpSM.h"