Skip to content

Commit

Permalink
network: constify several functions
Browse files Browse the repository at this point in the history
(cherry picked from commit b088c3d)
  • Loading branch information
yuwata authored and bluca committed Jul 7, 2023
1 parent 72d6e89 commit e1c54c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/network/networkd-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);
\
t->state = (t->state & ~mask) | (value & mask); \
} \
static inline bool name##_exists(type *t) { \
static inline bool name##_exists(const type *t) { \
assert(t); \
\
if ((t->state & (NETWORK_CONFIG_STATE_CONFIGURING | \
Expand All @@ -90,7 +90,7 @@ int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);
NETWORK_CONFIG_STATE_REQUESTING, \
0); \
} \
static inline bool name##_is_requesting(type *t) { \
static inline bool name##_is_requesting(const type *t) { \
assert(t); \
return FLAGS_SET(t->state, NETWORK_CONFIG_STATE_REQUESTING); \
} \
Expand All @@ -115,7 +115,7 @@ int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);
static inline void name##_unmark(type *t) { \
name##_update_state(t, NETWORK_CONFIG_STATE_MARKED, 0); \
} \
static inline bool name##_is_marked(type *t) { \
static inline bool name##_is_marked(const type *t) { \
assert(t); \
return FLAGS_SET(t->state, NETWORK_CONFIG_STATE_MARKED); \
} \
Expand Down

0 comments on commit e1c54c8

Please sign in to comment.