[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.
This commit is contained in:
Abtin Keshavarzian
2026-03-06 00:46:33 -06:00
committed by GitHub
parent b69463d248
commit a34ad8c153
+4 -4
View File
@@ -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));