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;