[nexus] remove redundant cast in SendMlrRequest() (#13076)

This commit removes a redundant `static_cast<const uint8_t *>` when
calling `Tlv::Append<Ip6AddressesTlv>()` in `SendMlrRequest()` in
`test_1_2_MATN_TC_21.cpp`. Since the method accepts `const void *`
as its value argument, the explicit cast is unnecessary and can be
safely removed to simplify the code.
This commit is contained in:
Abtin Keshavarzian
2026-05-06 22:59:44 -05:00
committed by GitHub
parent 2fbc9f43d9
commit 763af19c5d
+1 -1
View File
@@ -111,7 +111,7 @@ void SendMlrRequest(Node &aSource, const Ip6::Address &aDestination, const void
Coap::Message *message = aSource.Get<Tmf::Agent>().AllocateAndInitPriorityConfirmablePostMessage(kUriMlr);
VerifyOrQuit(message != nullptr);
SuccessOrQuit(Tlv::Append<Ip6AddressesTlv>(*message, static_cast<const uint8_t *>(aAddressesData), aDataLength));
SuccessOrQuit(Tlv::Append<Ip6AddressesTlv>(*message, aAddressesData, aDataLength));
SuccessOrQuit(aSource.Get<Tmf::Agent>().SendMessageTo(*message, aDestination));
}