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:
parent
86c2a76e09
commit
b088c3d3fc
@ -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); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user