Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
959087f2
Commit
959087f2
authored
6 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
gnrc_netif_hdr: make input parameters constant
parent
5794a228
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/include/net/gnrc/netif/hdr.h
+3
-3
3 additions, 3 deletions
sys/include/net/gnrc/netif/hdr.h
with
3 additions
and
3 deletions
sys/include/net/gnrc/netif/hdr.h
+
3
−
3
View file @
959087f2
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment