1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

network: constify several functions

This commit is contained in:
Yu Watanabe 2023-07-03 16:00:20 +09:00
parent 86c2a76e09
commit b088c3d3fc

View File

@ -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 | \
@ -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); \
} \
@ -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); \
} \