From e55906c5ebc9fb357fc1b6b35016b3d8cf1d8f2b Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 8 May 2020 17:17:47 -0700 Subject: [PATCH] [mesh-forwarder] change GetForwardFramePriority() to return void (#4941) --- src/core/thread/mesh_forwarder.hpp | 2 +- src/core/thread/mesh_forwarder_ftd.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/thread/mesh_forwarder.hpp b/src/core/thread/mesh_forwarder.hpp index 259ee06df..0f90fb5e1 100644 --- a/src/core/thread/mesh_forwarder.hpp +++ b/src/core/thread/mesh_forwarder.hpp @@ -426,7 +426,7 @@ private: const Mac::Address &aMacDest, uint8_t & aPriority); otError GetFragmentPriority(Lowpan::FragmentHeader &aFragmentHeader, uint16_t aSrcRloc16, uint8_t &aPriority); - otError GetForwardFramePriority(const uint8_t * aFrame, + void GetForwardFramePriority(const uint8_t * aFrame, uint16_t aFrameLength, const Mac::Address &aMeshSource, const Mac::Address &aMeshDest, diff --git a/src/core/thread/mesh_forwarder_ftd.cpp b/src/core/thread/mesh_forwarder_ftd.cpp index c39a72f29..61a15186d 100644 --- a/src/core/thread/mesh_forwarder_ftd.cpp +++ b/src/core/thread/mesh_forwarder_ftd.cpp @@ -658,7 +658,7 @@ void MeshForwarder::HandleMesh(uint8_t * aFrame, meshHeader.DecrementHopsLeft(); - IgnoreError(GetForwardFramePriority(aFrame, aFrameLength, meshSource, meshDest, priority)); + GetForwardFramePriority(aFrame, aFrameLength, meshSource, meshDest, priority); message = Get().New(Message::kType6lowpan, priority); VerifyOrExit(message != NULL, error = OT_ERROR_NO_BUFS); @@ -842,11 +842,11 @@ exit: return error; } -otError MeshForwarder::GetForwardFramePriority(const uint8_t * aFrame, - uint16_t aFrameLength, - const Mac::Address &aMeshSource, - const Mac::Address &aMeshDest, - uint8_t & aPriority) +void MeshForwarder::GetForwardFramePriority(const uint8_t * aFrame, + uint16_t aFrameLength, + const Mac::Address &aMeshSource, + const Mac::Address &aMeshDest, + uint8_t & aPriority) { otError error = OT_ERROR_NONE; bool isFragment = false; @@ -881,7 +881,7 @@ exit: UpdateFragmentPriority(fragmentHeader, aFrameLength, aMeshSource.GetShort(), aPriority); } - return error; + return; } otError MeshForwarder::GetDestinationRlocByServiceAloc(uint16_t aServiceAloc, uint16_t &aMeshDest)