From a34ad8c15342172d3414ff6671dce585539dfccc Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 5 Mar 2026 22:46:33 -0800 Subject: [PATCH] [otns] use `Coap::Message::UriPathStringBuffer` in `EmitCoapStatus` (#12633) This commit updates the `Otns::EmitCoapStatus()` method to use the `Coap::Message::UriPathStringBuffer` typedef for the `uriPath` local variable, replacing an explicit character array definition. This improves code consistency and matches the expected parameter type of the `Coap::Message::ReadUriPathOptions()` method. --- src/core/utils/otns.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/utils/otns.cpp b/src/core/utils/otns.cpp index 16099c551..395231bfe 100644 --- a/src/core/utils/otns.cpp +++ b/src/core/utils/otns.cpp @@ -199,10 +199,10 @@ void Otns::EmitCoapStatus(const char *aAction, const Ip6::MessageInfo &aMessageInfo, Error *aError) const { - Error error; - char uriPath[Coap::Message::kMaxReceivedUriPath + 1]; - StatusString string; - Coap::HeaderInfo header; + Error error; + Coap::Message::UriPathStringBuffer uriPath; + StatusString string; + Coap::HeaderInfo header; SuccessOrExit(error = aMessage.ParseHeaderInfo(header)); SuccessOrExit(error = aMessage.ReadUriPathOptions(uriPath));