mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 08:20:11 +01:00
all: don't use "static inline" in source files
For static functions inside a module, the compiler determines on its own whether to inline the function. Also, "inline" was used at some places that don't immediatly look like candidates for inlining. It was most likely a copy&paste error.
This commit is contained in:
parent
bb341900dd
commit
d25ed0820c
17 changed files with 23 additions and 23 deletions
|
|
@ -461,7 +461,7 @@ again:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
check_permissions (struct stat *s, const char **out_error_msg)
|
||||
{
|
||||
g_return_val_if_fail (s != NULL, FALSE);
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ nm_setting_bridge_get_multicast_snooping (NMSettingBridge *setting)
|
|||
return NM_SETTING_BRIDGE_GET_PRIVATE (setting)->multicast_snooping;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
check_range (guint32 val,
|
||||
guint32 min,
|
||||
guint32 max,
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
G_STATIC_ASSERT (sizeof (guint) == sizeof (gboolean));
|
||||
|
||||
static inline void
|
||||
static void
|
||||
set_array_from_gvalue (const GValue *v, uint *a, size_t len)
|
||||
{
|
||||
GArray *src = g_value_get_boxed (v);
|
||||
|
|
@ -731,7 +731,7 @@ set_array_from_gvalue (const GValue *v, uint *a, size_t len)
|
|||
}
|
||||
#define SET_ARRAY_FROM_GVALUE(v, a) set_array_from_gvalue (v, a, G_N_ELEMENTS (a))
|
||||
|
||||
static inline void
|
||||
static void
|
||||
set_gvalue_from_array (GValue *v, uint *a, size_t len)
|
||||
{
|
||||
GArray *src = g_array_sized_new (FALSE, TRUE, sizeof (guint), len);
|
||||
|
|
|
|||
|
|
@ -5356,7 +5356,7 @@ _json_find_object (json_t *json,
|
|||
return json_element;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
_json_delete_object_on_int_match (json_t *json,
|
||||
const char *key1,
|
||||
const char *key2,
|
||||
|
|
@ -5372,7 +5372,7 @@ _json_delete_object_on_int_match (json_t *json,
|
|||
_json_del_object (json, key1, key2, key3);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
_json_delete_object_on_bool_match (json_t *json,
|
||||
const char *key1,
|
||||
const char *key2,
|
||||
|
|
@ -5388,7 +5388,7 @@ _json_delete_object_on_bool_match (json_t *json,
|
|||
_json_del_object (json, key1, key2, key3);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
_json_delete_object_on_string_match (json_t *json,
|
||||
const char *key1,
|
||||
const char *key2,
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ nm_setting_bridge_get_ageing_time (NMSettingBridge *setting)
|
|||
#define BR_MIN_AGEING_TIME 0
|
||||
#define BR_MAX_AGEING_TIME 1000000
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
check_range (guint32 val,
|
||||
guint32 min,
|
||||
guint32 max,
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ nm_setting_dcb_init (NMSettingDcb *setting)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
set_uint_array (const GValue *v, uint *a, size_t len)
|
||||
{
|
||||
GArray *src = g_value_get_boxed (v);
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ nm_setting_compare (NMSetting *a,
|
|||
return same;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
should_compare_prop (NMSetting *setting,
|
||||
const char *prop_name,
|
||||
NMSettingCompareFlags comp_flags,
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ get_secrets_info_free (GetSecretsInfo *info)
|
|||
g_slice_free (GetSecretsInfo, info);
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
should_auto_register (NMSecretAgentOld *self)
|
||||
{
|
||||
NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (self);
|
||||
|
|
|
|||
|
|
@ -9517,7 +9517,7 @@ restore_ip6_properties (NMDevice *self)
|
|||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
set_disable_ipv6 (NMDevice *self, const char *value)
|
||||
{
|
||||
/* We only touch disable_ipv6 when NM is not managing the IPv6LL address */
|
||||
|
|
@ -9525,7 +9525,7 @@ set_disable_ipv6 (NMDevice *self, const char *value)
|
|||
nm_device_sysctl_ip_conf_set (self, AF_INET6, "disable_ipv6", value);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
set_nm_ipv6ll (NMDevice *self, gboolean enable)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ nm_dhcp_dhclient_escape_duid (GBytes *duid)
|
|||
return escaped;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
isoctal (const guint8 *p)
|
||||
{
|
||||
return ( p[0] >= '0' && p[0] <= '3'
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ start (NMNDisc *ndisc)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline int
|
||||
static int
|
||||
ipv6_sysctl_get (NMPlatform *platform, const char *ifname, const char *property, int min, int max, int defval)
|
||||
{
|
||||
return nm_platform_sysctl_ip_conf_get_int_checked (platform,
|
||||
|
|
|
|||
|
|
@ -709,7 +709,7 @@ nm_utils_kill_child_async (pid_t pid, int sig, NMLogDomain log_domain,
|
|||
g_child_watch_add (pid, _kc_cb_watch_child, data);
|
||||
}
|
||||
|
||||
static inline gulong
|
||||
static gulong
|
||||
_sleep_duration_convert_ms_to_us (guint32 sleep_duration_msec)
|
||||
{
|
||||
if (sleep_duration_msec > 0) {
|
||||
|
|
|
|||
|
|
@ -2901,7 +2901,7 @@ nm_ip4_config_nmpobj_remove (NMIP4Config *self,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hash_u32 (GChecksum *sum, guint32 n)
|
||||
{
|
||||
g_checksum_update (sum, (const guint8 *) &n, sizeof (n));
|
||||
|
|
|
|||
|
|
@ -2353,13 +2353,13 @@ nm_ip6_config_nmpobj_remove (NMIP6Config *self,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hash_u32 (GChecksum *sum, guint32 n)
|
||||
{
|
||||
g_checksum_update (sum, (const guint8 *) &n, sizeof (n));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hash_in6addr (GChecksum *sum, const struct in6_addr *a)
|
||||
{
|
||||
if (a)
|
||||
|
|
|
|||
|
|
@ -894,7 +894,7 @@ nmp_utils_ethtool_get_link_settings (int ifindex,
|
|||
| ADVERTISED_1000baseT_Full \
|
||||
| ADVERTISED_10000baseT_Full )
|
||||
|
||||
static inline guint32
|
||||
static guint32
|
||||
get_baset_mode (guint32 speed, NMPlatformLinkDuplexType duplex)
|
||||
{
|
||||
if (duplex == NM_PLATFORM_LINK_DUPLEX_UNKNOWN)
|
||||
|
|
|
|||
|
|
@ -1545,13 +1545,13 @@ _vt_cmd_plobj_id_hash_update (tfilter, NMPlatformTfilter, {
|
|||
obj->handle);
|
||||
})
|
||||
|
||||
static inline void
|
||||
static void
|
||||
_vt_cmd_plobj_hash_update_ip4_route (const NMPlatformObject *obj, NMHashState *h)
|
||||
{
|
||||
return nm_platform_ip4_route_hash_update ((const NMPlatformIP4Route *) obj, NM_PLATFORM_IP_ROUTE_CMP_TYPE_FULL, h);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
_vt_cmd_plobj_hash_update_ip6_route (const NMPlatformObject *obj, NMHashState *h)
|
||||
{
|
||||
return nm_platform_ip6_route_hash_update ((const NMPlatformIP6Route *) obj, NM_PLATFORM_IP_ROUTE_CMP_TYPE_FULL, h);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ NM_CACHED_QUARK_FCN ("nm-supplicant-error-quark", nm_supplicant_error_quark)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
static gboolean
|
||||
die_count_exceeded (guint32 count)
|
||||
{
|
||||
return count > 2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue