mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 05:47:40 +00:00
[core] change return type of otMessageRead() (#3707)
This commit is contained in:
@@ -272,7 +272,7 @@ otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength)
|
|||||||
* @sa otMessageWrite
|
* @sa otMessageWrite
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength);
|
uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write bytes to a message.
|
* Write bytes to a message.
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength)
|
|||||||
return message.Append(aBuf, aLength);
|
return message.Append(aBuf, aLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
int otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength)
|
uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength)
|
||||||
{
|
{
|
||||||
const Message &message = *static_cast<const Message *>(aMessage);
|
const Message &message = *static_cast<const Message *>(aMessage);
|
||||||
return message.Read(aOffset, aLength, aBuf);
|
return message.Read(aOffset, aLength, aBuf);
|
||||||
|
|||||||
Reference in New Issue
Block a user