summaryrefslogtreecommitdiff
path: root/libnm-glib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-02-02 10:55:34 +0100
committerThomas Haller <thaller@redhat.com>2018-02-07 13:32:04 +0100
commite4839accf5a5b470b9bf2287f0269ddc4ce0f91b (patch)
treebdc92d91b24d7b7fb25d8b9652dbe08d08e57cea /libnm-glib
parentca7273b3e250e46451d93e75a2234c403eed38aa (diff)
all: replace non-leading tabs with spaces
We commonly only allow tabs at the beginning of a line, not afterwards. The reason for this style is so that the code looks formated right with tabstop=4 and tabstop=8.
Diffstat (limited to 'libnm-glib')
-rw-r--r--libnm-glib/libnm-glib-test.c4
-rw-r--r--libnm-glib/libnm_glib.c98
-rw-r--r--libnm-glib/nm-access-point.c2
-rw-r--r--libnm-glib/nm-vpn-plugin-ui-interface.c20
-rw-r--r--libnm-glib/nm-vpn-plugin-ui-interface.h2
5 files changed, 63 insertions, 63 deletions
diff --git a/libnm-glib/libnm-glib-test.c b/libnm-glib/libnm-glib-test.c
index 5f15a5106..c4723c954 100644
--- a/libnm-glib/libnm-glib-test.c
+++ b/libnm-glib/libnm-glib-test.c
@@ -47,12 +47,12 @@ test_wireless_enabled (NMClient *client)
wireless = nm_client_wireless_get_enabled (client);
g_print ("Wireless enabled? %s\n", wireless ? "yes" : "no");
-// nm_client_wireless_set_enabled (client, !wireless);
+// nm_client_wireless_set_enabled (client, !wireless);
wireless = nm_client_wireless_hardware_get_enabled (client);
g_print ("Wireless HW enabled? %s\n", wireless ? "yes" : "no");
-// nm_client_wireless_set_enabled (client, !wireless);
+// nm_client_wireless_set_enabled (client, !wireless);
return TRUE;
}
diff --git a/libnm-glib/libnm_glib.c b/libnm-glib/libnm_glib.c
index 2c0b9657c..59097995b 100644
--- a/libnm-glib/libnm_glib.c
+++ b/libnm-glib/libnm_glib.c
@@ -32,37 +32,37 @@
#include "NetworkManager.h"
#include "libnm_glib.h"
-#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
+#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
struct libnm_glib_ctx
{
- unsigned char check;
+ unsigned char check;
- GMainContext * g_main_ctx;
- GMainLoop * g_main_loop;
- DBusConnection * dbus_con;
- guint dbus_watcher;
- guint dbus_watch_interval;
+ GMainContext * g_main_ctx;
+ GMainLoop * g_main_loop;
+ DBusConnection * dbus_con;
+ guint dbus_watcher;
+ guint dbus_watch_interval;
- gboolean thread_done;
- gboolean thread_inited;
- GThread * thread;
+ gboolean thread_done;
+ gboolean thread_inited;
+ GThread * thread;
- GSList * callbacks;
- GMutex * callbacks_lock;
- guint callback_id_last;
+ GSList * callbacks;
+ GMutex * callbacks_lock;
+ guint callback_id_last;
- libnm_glib_state nm_state;
+ libnm_glib_state nm_state;
};
typedef struct libnm_glib_callback
{
- guint id;
- GMainContext * gmain_ctx;
- libnm_glib_ctx * libnm_glib_ctx;
- libnm_glib_callback_func func;
- gpointer user_data;
+ guint id;
+ GMainContext * gmain_ctx;
+ libnm_glib_ctx * libnm_glib_ctx;
+ libnm_glib_callback_func func;
+ gpointer user_data;
} libnm_glib_callback;
@@ -74,9 +74,9 @@ static void _libnm_glib_update_state (libnm_glib_ctx *ctx, NMState state);
static void
_libnm_glib_nm_state_cb (DBusPendingCall *pcall, void *user_data)
{
- DBusMessage * reply;
- libnm_glib_ctx * ctx = (libnm_glib_ctx *) user_data;
- NMState nm_state;
+ DBusMessage *reply;
+ libnm_glib_ctx *ctx = (libnm_glib_ctx *) user_data;
+ NMState nm_state;
g_return_if_fail (pcall != NULL);
g_return_if_fail (ctx != NULL);
@@ -108,8 +108,8 @@ out:
static void
_libnm_glib_get_nm_state (libnm_glib_ctx *ctx)
{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
+ DBusMessage *message;
+ DBusPendingCall *pcall = NULL;
g_return_if_fail (ctx != NULL);
@@ -125,7 +125,7 @@ _libnm_glib_get_nm_state (libnm_glib_ctx *ctx)
static gboolean
_libnm_glib_callback_helper (gpointer user_data)
{
- libnm_glib_callback *cb_data = (libnm_glib_callback *)user_data;
+ libnm_glib_callback *cb_data = (libnm_glib_callback *)user_data;
g_return_val_if_fail (cb_data != NULL, FALSE);
g_return_val_if_fail (cb_data->func != NULL, FALSE);
@@ -140,7 +140,7 @@ static void
_libnm_glib_schedule_single_callback (libnm_glib_ctx *ctx,
libnm_glib_callback *callback)
{
- GSource *source;
+ GSource *source;
g_return_if_fail (ctx != NULL);
g_return_if_fail (callback != NULL);
@@ -170,7 +170,7 @@ _libnm_glib_unschedule_single_callback (libnm_glib_ctx *ctx,
static void
_libnm_glib_call_callbacks (libnm_glib_ctx *ctx)
{
- GSList *elem;
+ GSList *elem;
g_return_if_fail (ctx != NULL);
@@ -188,7 +188,7 @@ _libnm_glib_call_callbacks (libnm_glib_ctx *ctx)
static void
_libnm_glib_update_state (libnm_glib_ctx *ctx, NMState state)
{
- libnm_glib_state old_state;
+ libnm_glib_state old_state;
g_return_if_fail (ctx != NULL);
@@ -221,9 +221,9 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
DBusMessage *message,
void *user_data)
{
- libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
- gboolean handled = TRUE;
- DBusError error;
+ libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
+ gboolean handled = TRUE;
+ DBusError error;
g_return_val_if_fail (ctx != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
@@ -242,9 +242,9 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
{
/* New signal for dbus 0.23... */
- char *service;
- char *old_owner;
- char *new_owner;
+ char *service;
+ char *old_owner;
+ char *new_owner;
if ( dbus_message_get_args (message, &error,
DBUS_TYPE_STRING, &service,
@@ -257,9 +257,9 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
gboolean old_owner_good = (old_owner && (strlen (old_owner) > 0));
gboolean new_owner_good = (new_owner && (strlen (new_owner) > 0));
- if (!old_owner_good && new_owner_good) /* Equivalent to old ServiceCreated signal */
+ if (!old_owner_good && new_owner_good) /* Equivalent to old ServiceCreated signal */
_libnm_glib_get_nm_state (ctx);
- else if (old_owner_good && !new_owner_good) /* Equivalent to old ServiceDeleted signal */
+ else if (old_owner_good && !new_owner_good) /* Equivalent to old ServiceDeleted signal */
ctx->nm_state = LIBNM_NO_NETWORKMANAGER;
}
}
@@ -273,7 +273,7 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
}
else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "StateChanged"))
{
- NMState state = NM_STATE_UNKNOWN;
+ NMState state = NM_STATE_UNKNOWN;
dbus_message_get_args (message, &error, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID);
_libnm_glib_update_state (ctx, state);
@@ -297,8 +297,8 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
static DBusConnection *
_libnm_glib_dbus_init (gpointer *user_data, GMainContext *context)
{
- DBusConnection *connection = NULL;
- DBusError error;
+ DBusConnection *connection = NULL;
+ DBusError error;
dbus_error_init (&error);
connection = dbus_bus_get_private (DBUS_BUS_SYSTEM, &error);
@@ -349,7 +349,7 @@ _libnm_glib_dbus_init (gpointer *user_data, GMainContext *context)
static gboolean
_libnm_glib_dbus_watcher (gpointer user_data)
{
- libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
+ libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
g_return_val_if_fail (ctx != NULL, FALSE);
@@ -393,7 +393,7 @@ _libnm_glib_schedule_dbus_watcher (libnm_glib_ctx *ctx)
if (ctx->dbus_watcher == 0)
{
- GSource * source = g_timeout_source_new (ctx->dbus_watch_interval);
+ GSource *source = g_timeout_source_new (ctx->dbus_watch_interval);
g_source_set_callback (source, _libnm_glib_dbus_watcher, (gpointer) ctx, NULL);
ctx->dbus_watcher = g_source_attach (source, ctx->g_main_ctx);
g_source_unref (source);
@@ -410,7 +410,7 @@ _libnm_glib_schedule_dbus_watcher (libnm_glib_ctx *ctx)
static gpointer
_libnm_glib_dbus_worker (gpointer user_data)
{
- libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
+ libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
g_return_val_if_fail (ctx != NULL, NULL);
@@ -493,7 +493,7 @@ error:
libnm_glib_ctx *
libnm_glib_init (void)
{
- libnm_glib_ctx *ctx = NULL;
+ libnm_glib_ctx *ctx = NULL;
if (!g_thread_supported ())
g_thread_init (NULL);
@@ -504,7 +504,7 @@ libnm_glib_init (void)
ctx->thread = g_thread_create (_libnm_glib_dbus_worker, ctx, TRUE, NULL);
if (!ctx->thread)
- goto error;
+ goto error;
/* Wait until initialization of the thread */
while (!ctx->thread_inited)
@@ -542,12 +542,12 @@ libnm_glib_get_network_state (const libnm_glib_ctx *ctx)
guint
-libnm_glib_register_callback (libnm_glib_ctx *ctx,
- libnm_glib_callback_func func,
- gpointer user_data,
- GMainContext *g_main_ctx)
+libnm_glib_register_callback (libnm_glib_ctx *ctx,
+ libnm_glib_callback_func func,
+ gpointer user_data,
+ GMainContext *g_main_ctx)
{
- libnm_glib_callback *callback = NULL;
+ libnm_glib_callback *callback = NULL;
g_return_val_if_fail (ctx != NULL, 0);
g_return_val_if_fail (func != NULL, 0);
diff --git a/libnm-glib/nm-access-point.c b/libnm-glib/nm-access-point.c
index 70b98f6de..3b923aa28 100644
--- a/libnm-glib/nm-access-point.c
+++ b/libnm-glib/nm-access-point.c
@@ -664,7 +664,7 @@ nm_access_point_class_init (NMAccessPointClass *ap_class)
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
-
+
/**
* NMAccessPoint:mode:
*
diff --git a/libnm-glib/nm-vpn-plugin-ui-interface.c b/libnm-glib/nm-vpn-plugin-ui-interface.c
index fee6fc9f2..f06e77c42 100644
--- a/libnm-glib/nm-vpn-plugin-ui-interface.c
+++ b/libnm-glib/nm-vpn-plugin-ui-interface.c
@@ -78,13 +78,13 @@ nm_vpn_plugin_ui_interface_get_type (void)
if (!vpn_plugin_ui_interface_type) {
const GTypeInfo vpn_plugin_ui_interface_info = {
sizeof (NMVpnPluginUiInterface), /* class_size */
- interface_init, /* base_init */
- NULL, /* base_finalize */
+ interface_init, /* base_init */
+ NULL, /* base_finalize */
NULL,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
0,
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
NULL
};
@@ -197,13 +197,13 @@ nm_vpn_plugin_ui_widget_interface_get_type (void)
if (!vpn_plugin_ui_widget_interface_type) {
const GTypeInfo vpn_plugin_ui_widget_interface_info = {
sizeof (NMVpnPluginUiWidgetInterface), /* class_size */
- widget_interface_init, /* base_init */
- NULL, /* base_finalize */
+ widget_interface_init, /* base_init */
+ NULL, /* base_finalize */
NULL,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
0,
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
NULL
};
diff --git a/libnm-glib/nm-vpn-plugin-ui-interface.h b/libnm-glib/nm-vpn-plugin-ui-interface.h
index b5ea2a7ef..bc5d84360 100644
--- a/libnm-glib/nm-vpn-plugin-ui-interface.h
+++ b/libnm-glib/nm-vpn-plugin-ui-interface.h
@@ -272,4 +272,4 @@ gboolean nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInte
G_END_DECLS
-#endif /* NM_VPN_PLUGIN_UI_INTERFACE_H */
+#endif /* NM_VPN_PLUGIN_UI_INTERFACE_H */