mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
network: constify several functions
This commit is contained in:
@@ -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); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user