From b088c3d3fc3a7a3a659ec0fe903a29cabd66dc49 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 3 Jul 2023 16:00:20 +0900 Subject: [PATCH] network: constify several functions --- src/network/networkd-util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-util.h b/src/network/networkd-util.h index f75fb1f8685..9c360f55264 100644 --- a/src/network/networkd-util.h +++ b/src/network/networkd-util.h @@ -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); \ } \