This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is this a bug? return (packet_buffer_packet_t *) &p_buffer->buffer[index];

below is a little part of code copied from nrf5_SDK_for_Mesh_v2.2.0_src:

************************************************************************************************************************

static inline packet_buffer_packet_t * m_get_packet(const packet_buffer_t * p_buffer, uint16_t index)
{
return (packet_buffer_packet_t *) &p_buffer->buffer[index]; 
}

*************************************************************************************************************************

buffer is defined as uint8_t *, how can it be packet_buffer_packet_t *?

Is this a bug?

Related