Skip to content
Snippets Groups Projects
Unverified Commit 3cf4b238 authored by Martine Lenders's avatar Martine Lenders Committed by GitHub
Browse files

Merge pull request #10525 from miri64/gnrc_netif_hdr/enh/const-input

gnrc_netif_hdr: make input parameters constant
parents 297aa4eb 959087f2
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ static inline void gnrc_netif_hdr_init(gnrc_netif_hdr_t *hdr, uint8_t src_l2addr
* @return the size of the given header, including link layer
* addresses
*/
static inline size_t gnrc_netif_hdr_sizeof(gnrc_netif_hdr_t *hdr)
static inline size_t gnrc_netif_hdr_sizeof(const gnrc_netif_hdr_t *hdr)
{
return sizeof(gnrc_netif_hdr_t) + hdr->src_l2addr_len + hdr->dst_l2addr_len;
}
......@@ -143,7 +143,7 @@ static inline size_t gnrc_netif_hdr_sizeof(gnrc_netif_hdr_t *hdr)
* @return pointer to source address on success
* @return NULL on error
*/
static inline uint8_t *gnrc_netif_hdr_get_src_addr(gnrc_netif_hdr_t *hdr)
static inline uint8_t *gnrc_netif_hdr_get_src_addr(const gnrc_netif_hdr_t *hdr)
{
return ((uint8_t *)(hdr + 1));
}
......@@ -174,7 +174,7 @@ static inline void gnrc_netif_hdr_set_src_addr(gnrc_netif_hdr_t *hdr, uint8_t *a
* @return pointer to destination address on success
* @return NULL on error
*/
static inline uint8_t *gnrc_netif_hdr_get_dst_addr(gnrc_netif_hdr_t *hdr)
static inline uint8_t *gnrc_netif_hdr_get_dst_addr(const gnrc_netif_hdr_t *hdr)
{
return (((uint8_t *)(hdr + 1)) + hdr->src_l2addr_len);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment