diff options
author | Thomas Haller <thaller@redhat.com> | 2020-02-13 14:55:26 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-02-13 17:17:07 +0100 |
commit | cd314370248b2bb199d8643fee09aa05d15a1859 (patch) | |
tree | 677326b4b14cd5ddd64b56bfc7aee3252426849d /src/platform/nm-linux-platform.c | |
parent | 17d9b852c80ceefa37478eea03e844d0d057c4de (diff) | |
download | NetworkManager-cd314370248b2bb199d8643fee09aa05d15a1859.tar.gz |
shared: drop _STATIC variant of macros that define functions
Several macros are used to define function. They had a "_STATIC" variant,
to define the function as static.
I think those macros should not try to abstract entirely what they do.
They should not accept the function scope as argument (or have two
variants per scope). This also because it might make sense to add
additional __attribute__(()) to the function. That only works, if
the macro does not pretend to *not* define a plain function.
Instead, embrace what the function does and let the users place the
function scope as they see fit.
This also follows what is already done with
static NM_CACHED_QUARK_FCN ("autoconnect-root", autoconnect_root_quark)
Diffstat (limited to 'src/platform/nm-linux-platform.c')
-rw-r--r-- | src/platform/nm-linux-platform.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index b71576d5d2..0d4181f8fb 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -5193,7 +5193,8 @@ refresh_all_type_get_info (RefreshAllType refresh_all_type) return &infos[refresh_all_type]; } -_NM_UTILS_LOOKUP_DEFINE (static, delayed_action_type_to_refresh_all_type, DelayedActionType, RefreshAllType, +static +NM_UTILS_LOOKUP_DEFINE (delayed_action_type_to_refresh_all_type, DelayedActionType, RefreshAllType, NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT (0), NM_UTILS_LOOKUP_ITEM (DELAYED_ACTION_TYPE_REFRESH_ALL_LINKS, REFRESH_ALL_TYPE_LINKS), NM_UTILS_LOOKUP_ITEM (DELAYED_ACTION_TYPE_REFRESH_ALL_IP4_ADDRESSES, REFRESH_ALL_TYPE_IP4_ADDRESSES), @@ -5276,7 +5277,8 @@ delayed_action_refresh_from_needle_object (const NMPObject *obj_needle) return delayed_action_type_from_refresh_all_type (refresh_all_type_from_needle_object (obj_needle)); } -NM_UTILS_LOOKUP_STR_DEFINE_STATIC (delayed_action_to_string, DelayedActionType, +static +NM_UTILS_LOOKUP_STR_DEFINE (delayed_action_to_string, DelayedActionType, NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT ("unknown"), NM_UTILS_LOOKUP_STR_ITEM (DELAYED_ACTION_TYPE_REFRESH_ALL_LINKS, "refresh-all-links"), NM_UTILS_LOOKUP_STR_ITEM (DELAYED_ACTION_TYPE_REFRESH_ALL_IP4_ADDRESSES, "refresh-all-ip4-addresses"), |