Commit 9a64168c authored by Thomas Haller's avatar Thomas Haller

all: use "static inline" keywords instead of "inline static"

Use a consistent order of "static inline". This seems the prefered
order in general, and we also use it more often already.
parent 8e12396b
......@@ -134,7 +134,7 @@ __g_type_ensure (GType type)
/* Rumtime check for glib version. First do a compile time check which
* (if satisfied) shortcuts the runtime check. */
inline static gboolean
static inline gboolean
nm_glib_check_version (guint major, guint minor, guint micro)
{
return GLIB_CHECK_VERSION (major, minor, micro)
......@@ -147,7 +147,7 @@ nm_glib_check_version (guint major, guint minor, guint micro)
}
/* g_test_skip() is only available since glib 2.38. Add a compatibility wrapper. */
inline static void
static inline void
__nmtst_g_test_skip (const gchar *msg)
{
#if GLIB_CHECK_VERSION (2, 38, 0)
......@@ -162,7 +162,7 @@ __nmtst_g_test_skip (const gchar *msg)
/* g_test_add_data_func_full() is only available since glib 2.34. Add a compatibility wrapper. */
inline static void
static inline void
__g_test_add_data_func_full (const char *testpath,
gpointer test_data,
GTestDataFunc test_func,
......@@ -278,7 +278,7 @@ _nm_g_ptr_array_insert (GPtrArray *array,
#if !GLIB_CHECK_VERSION (2, 40, 0)
inline static gboolean
static inline gboolean
_g_key_file_save_to_file (GKeyFile *key_file,
const gchar *filename,
GError **error)
......
This diff is collapsed.
......@@ -24,7 +24,8 @@
#include "nm-device.h"
#define _LOG_DECLARE_SELF(t) \
_nm_unused inline static NMDevice * \
_nm_unused \
static inline NMDevice * \
_nm_device_log_self_to_device (t *self) \
{ \
return (NMDevice *) self; \
......
......@@ -167,7 +167,7 @@ static gboolean _ip4_device_routes_cancel (NMRouteManager *self);
/*****************************************************************************/
#if NM_MORE_ASSERTS && !defined (G_DISABLE_ASSERT)
inline static void
static inline void
ASSERT_route_index_valid (const VTableIP *vtable, const GArray *entries, const RouteIndex *index, gboolean unique_ifindexes)
{
guint i, j;
......
......@@ -30,12 +30,12 @@
/*****************************************************************************/
inline static void
static inline void
nmtst_init_with_logging (int *argc, char ***argv, const char *log_level, const char *log_domains)
{
__nmtst_init (argc, argv, FALSE, log_level, log_domains, NULL);
}
inline static void
static inline void
nmtst_init_assert_logging (int *argc, char ***argv, const char *log_level, const char *log_domains)
{
gboolean set_logging;
......@@ -54,7 +54,7 @@ nmtst_init_assert_logging (int *argc, char ***argv, const char *log_level, const
#ifdef __NETWORKMANAGER_PLATFORM_H__
inline static NMPlatformIP4Address *
static inline NMPlatformIP4Address *
nmtst_platform_ip4_address (const char *address, const char *peer_address, guint plen)
{
static NMPlatformIP4Address addr;
......@@ -72,7 +72,7 @@ nmtst_platform_ip4_address (const char *address, const char *peer_address, guint
return &addr;
}
inline static NMPlatformIP4Address *
static inline NMPlatformIP4Address *
nmtst_platform_ip4_address_full (const char *address, const char *peer_address, guint plen,
int ifindex, NMIPConfigSource source, guint32 timestamp,
guint32 lifetime, guint32 preferred, guint32 flags,
......@@ -95,7 +95,7 @@ nmtst_platform_ip4_address_full (const char *address, const char *peer_address,
return addr;
}
inline static NMPlatformIP6Address *
static inline NMPlatformIP6Address *
nmtst_platform_ip6_address (const char *address, const char *peer_address, guint plen)
{
static NMPlatformIP6Address addr;
......@@ -110,7 +110,7 @@ nmtst_platform_ip6_address (const char *address, const char *peer_address, guint
return &addr;
}
inline static NMPlatformIP6Address *
static inline NMPlatformIP6Address *
nmtst_platform_ip6_address_full (const char *address, const char *peer_address, guint plen,
int ifindex, NMIPConfigSource source, guint32 timestamp,
guint32 lifetime, guint32 preferred, guint32 flags)
......@@ -127,7 +127,7 @@ nmtst_platform_ip6_address_full (const char *address, const char *peer_address,
return addr;
}
inline static NMPlatformIP4Route *
static inline NMPlatformIP4Route *
nmtst_platform_ip4_route (const char *network, guint plen, const char *gateway)
{
static NMPlatformIP4Route route;
......@@ -142,7 +142,7 @@ nmtst_platform_ip4_route (const char *network, guint plen, const char *gateway)
return &route;
}
inline static NMPlatformIP4Route *
static inline NMPlatformIP4Route *
nmtst_platform_ip4_route_full (const char *network, guint plen, const char *gateway,
int ifindex, NMIPConfigSource source,
guint metric, guint mss,
......@@ -161,7 +161,7 @@ nmtst_platform_ip4_route_full (const char *network, guint plen, const char *gate
return route;
}
inline static NMPlatformIP6Route *
static inline NMPlatformIP6Route *
nmtst_platform_ip6_route (const char *network, guint plen, const char *gateway)
{
static NMPlatformIP6Route route;
......@@ -176,7 +176,7 @@ nmtst_platform_ip6_route (const char *network, guint plen, const char *gateway)
return &route;
}
inline static NMPlatformIP6Route *
static inline NMPlatformIP6Route *
nmtst_platform_ip6_route_full (const char *network, guint plen, const char *gateway,
int ifindex, NMIPConfigSource source,
guint metric, guint mss)
......@@ -191,13 +191,13 @@ nmtst_platform_ip6_route_full (const char *network, guint plen, const char *gate
return route;
}
inline static int
static inline int
_nmtst_platform_ip4_routes_equal_sort (gconstpointer a, gconstpointer b, gpointer user_data)
{
return nm_platform_ip4_route_cmp ((const NMPlatformIP4Route *) a, (const NMPlatformIP4Route *) b);
}
inline static void
static inline void
nmtst_platform_ip4_routes_equal (const NMPlatformIP4Route *a, const NMPlatformIP4Route *b, gsize len, gboolean ignore_order)
{
gsize i;
......@@ -225,13 +225,13 @@ nmtst_platform_ip4_routes_equal (const NMPlatformIP4Route *a, const NMPlatformIP
}
}
inline static int
static inline int
_nmtst_platform_ip6_routes_equal_sort (gconstpointer a, gconstpointer b, gpointer user_data)
{
return nm_platform_ip6_route_cmp ((const NMPlatformIP6Route *) a, (const NMPlatformIP6Route *) b);
}
inline static void
static inline void
nmtst_platform_ip6_routes_equal (const NMPlatformIP6Route *a, const NMPlatformIP6Route *b, gsize len, gboolean ignore_order)
{
gsize i;
......@@ -264,7 +264,7 @@ nmtst_platform_ip6_routes_equal (const NMPlatformIP6Route *a, const NMPlatformIP
#ifdef __NETWORKMANAGER_IP4_CONFIG_H__
inline static NMIP4Config *
static inline NMIP4Config *
nmtst_ip4_config_clone (NMIP4Config *config)
{
NMIP4Config *copy = nm_ip4_config_new (-1);
......@@ -280,7 +280,7 @@ nmtst_ip4_config_clone (NMIP4Config *config)
#ifdef __NETWORKMANAGER_IP6_CONFIG_H__
inline static NMIP6Config *
static inline NMIP6Config *
nmtst_ip6_config_clone (NMIP6Config *config)
{
NMIP6Config *copy = nm_ip6_config_new (-1);
......
......@@ -83,7 +83,7 @@ typedef enum {
NM_IP_CONFIG_SOURCE_USER,
} NMIPConfigSource;
inline static gboolean
static inline gboolean
NM_IS_IP_CONFIG_SOURCE_RTPROT (NMIPConfigSource source)
{
return source > NM_IP_CONFIG_SOURCE_UNKNOWN && source <= _NM_IP_CONFIG_SOURCE_RTPROT_LAST;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment