From 8bd8a0e7803675c01369eadc489a302052358367 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Wed, 14 Feb 2024 01:10:17 +0000 Subject: [PATCH] fix parameter use Signed-off-by: Lawrence Lee --- orchagent/dash/dashorch.cpp | 4 ++-- orchagent/dash/dashorch.h | 2 +- orchagent/dash/dashvnetorch.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/orchagent/dash/dashorch.cpp b/orchagent/dash/dashorch.cpp index d8e6161283..144ee4f80e 100644 --- a/orchagent/dash/dashorch.cpp +++ b/orchagent/dash/dashorch.cpp @@ -37,7 +37,7 @@ DashOrch::DashOrch(DBConnector *db, vector &tableName, ZmqServer *zmqSer SWSS_LOG_ENTER(); } -bool DashOrch::getRouteTypeActions(dash::route_type::RoutingType routing_type, dash::route_type::RouteType* route_type) +bool DashOrch::getRouteTypeActions(dash::route_type::RoutingType routing_type, dash::route_type::RouteType& route_type) { SWSS_LOG_ENTER(); @@ -48,7 +48,7 @@ bool DashOrch::getRouteTypeActions(dash::route_type::RoutingType routing_type, d return false; } - route_type = &it->second; + route_type = it->second; return true; } diff --git a/orchagent/dash/dashorch.h b/orchagent/dash/dashorch.h index c0df0a4ad4..445f9db464 100644 --- a/orchagent/dash/dashorch.h +++ b/orchagent/dash/dashorch.h @@ -39,7 +39,7 @@ class DashOrch : public ZmqOrch public: DashOrch(swss::DBConnector *db, std::vector &tables, swss::ZmqServer *zmqServer); const EniEntry *getEni(const std::string &eni) const; - bool getRouteTypeActions(dash::route_type::RoutingType routing_type, dash::route_type::RouteType* route_type); + bool getRouteTypeActions(dash::route_type::RoutingType routing_type, dash::route_type::RouteType& route_type); private: ApplianceTable appliance_entries_; diff --git a/orchagent/dash/dashvnetorch.cpp b/orchagent/dash/dashvnetorch.cpp index a8c0b058e7..9b634e479a 100644 --- a/orchagent/dash/dashvnetorch.cpp +++ b/orchagent/dash/dashvnetorch.cpp @@ -288,7 +288,7 @@ void DashVnetOrch::addOutboundCaToPa(const string& key, VnetMapBulkContext& ctxt DashOrch* dash_orch = gDirectory.get(); dash::route_type::RouteType route_type_actions; - if (!dash_orch->getRouteTypeActions(ctxt.metadata.action_type(), &route_type_actions)) + if (!dash_orch->getRouteTypeActions(ctxt.metadata.action_type(), route_type_actions)) { SWSS_LOG_ERROR("Failed to get route type actions for %s", key.c_str()); return;