From 1e3c1fe5e5852aa4dd872f887876dc3b80e2ddd6 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 19 Sep 2014 15:16:14 +1200 Subject: [PATCH] Remove trailing whitespace --- liblightdm-gobject/greeter.c | 12 +++--- liblightdm-gobject/language.c | 18 ++++----- liblightdm-gobject/layout.c | 16 ++++---- liblightdm-gobject/power.c | 2 +- liblightdm-gobject/session.c | 30 +++++++-------- liblightdm-gobject/user.c | 52 +++++++++++++------------- liblightdm-qt/QLightDM/greeter.h | 6 +-- liblightdm-qt/QLightDM/sessionsmodel.h | 2 +- liblightdm-qt/greeter.cpp | 8 ++-- liblightdm-qt/power.cpp | 2 +- src/accounts.c | 2 +- src/accounts.h | 2 +- src/console-kit.h | 2 +- src/display-manager.c | 6 +-- src/display-manager.h | 2 +- src/display-server.c | 2 +- src/display-server.h | 2 +- src/dm-tool.c | 22 +++++------ src/greeter.c | 20 +++++----- src/greeter.h | 2 +- src/guest-account.c | 10 ++--- src/guest-account.h | 2 +- src/lightdm-guest-session.c | 2 +- src/lightdm.c | 6 +-- src/login1.c | 6 +-- src/login1.h | 2 +- src/mir-server.c | 4 +- src/mir-server.h | 2 +- src/plymouth.c | 2 +- src/plymouth.h | 2 +- src/process.c | 24 ++++++------ src/process.h | 2 +- src/seat-unity.c | 8 ++-- src/seat-xdmcp-session.c | 2 +- src/seat-xdmcp-session.h | 2 +- src/seat-xlocal.c | 14 +++---- src/seat-xlocal.h | 2 +- src/seat-xremote.c | 4 +- src/seat-xremote.h | 2 +- src/seat-xvnc.c | 4 +- src/seat-xvnc.h | 2 +- src/seat.c | 26 ++++++------- src/seat.h | 2 +- src/session-child.c | 16 ++++---- src/session-child.h | 2 +- src/session-config.h | 2 +- src/session.c | 4 +- src/session.h | 2 +- src/shared-data-manager.c | 6 +-- src/shared-data-manager.h | 2 +- src/unity-system-compositor.c | 10 ++--- src/unity-system-compositor.h | 2 +- src/vnc-server.c | 18 ++++----- src/vnc-server.h | 2 +- src/vt.c | 8 ++-- src/vt.h | 2 +- src/x-authority.c | 14 +++---- src/x-authority.h | 4 +- src/x-server-local.c | 20 +++++----- src/x-server-local.h | 2 +- src/x-server-remote.c | 2 +- src/x-server-remote.h | 2 +- src/x-server-xvnc.c | 10 ++--- src/x-server-xvnc.h | 2 +- src/x-server.c | 10 ++--- src/x-server.h | 2 +- src/xdmcp-protocol.c | 14 +++---- src/xdmcp-protocol.h | 4 +- src/xdmcp-server.c | 28 +++++++------- src/xdmcp-server.h | 2 +- src/xdmcp-session-private.h | 4 +- src/xdmcp-session.c | 6 +-- src/xdmcp-session.h | 2 +- tests/src/X.c | 10 ++--- tests/src/Xvnc.c | 10 ++--- tests/src/dbus-env.c | 2 +- tests/src/libsystem.c | 42 ++++++++++----------- tests/src/plymouth.c | 2 +- tests/src/status.c | 2 +- tests/src/status.h | 2 +- tests/src/test-runner.c | 12 +++--- tests/src/test-script-hook.c | 2 +- tests/src/test-session.c | 4 +- tests/src/unity-system-compositor.c | 2 +- tests/src/vnc-client.c | 4 +- tests/src/x-authority.c | 10 ++--- tests/src/x-server.c | 6 +-- tests/src/xdmcp-client.c | 22 +++++------ 88 files changed, 339 insertions(+), 339 deletions(-) diff --git a/liblightdm-gobject/greeter.c b/liblightdm-gobject/greeter.c index e444dbf8..8214490c 100644 --- a/liblightdm-gobject/greeter.c +++ b/liblightdm-gobject/greeter.c @@ -374,7 +374,7 @@ handle_connected (LightDMGreeter *greeter, guint8 *message, gsize message_length while (*offset < message_length) { gchar *name, *value; - + name = read_string (message, message_length, offset); value = read_string (message, message_length, offset); g_hash_table_insert (priv->hints, name, value); @@ -876,7 +876,7 @@ lightdm_greeter_get_default_session_hint (LightDMGreeter *greeter) * accounts should be taken from #LightDMUserList and displayed in the greeter * for the user to choose from. Note that this list can be empty and it is * recommended you show a method for the user to enter a username manually. - * + * * If this option is shown the greeter should only allow these users to be * chosen for login unless the manual login hint is set. * @@ -969,7 +969,7 @@ lightdm_greeter_get_has_guest_account_hint (LightDMGreeter *greeter) g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE); value = lightdm_greeter_get_hint (greeter, "has-guest-account"); - + return g_strcmp0 (value, "true") == 0; } @@ -1003,7 +1003,7 @@ lightdm_greeter_get_select_guest_hint (LightDMGreeter *greeter) g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE); value = lightdm_greeter_get_hint (greeter, "select-guest"); - + return g_strcmp0 (value, "true") == 0; } @@ -1037,7 +1037,7 @@ lightdm_greeter_get_autologin_guest_hint (LightDMGreeter *greeter) g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE); value = lightdm_greeter_get_hint (greeter, "autologin-guest"); - + return g_strcmp0 (value, "true") == 0; } @@ -1107,7 +1107,7 @@ lightdm_greeter_authenticate (LightDMGreeter *greeter, const gchar *username) priv->cancelling_authentication = FALSE; priv->authenticate_sequence_number++; - priv->in_authentication = TRUE; + priv->in_authentication = TRUE; priv->is_authenticated = FALSE; if (username != priv->authentication_user) { diff --git a/liblightdm-gobject/language.c b/liblightdm-gobject/language.c index 4dce374a..91a46429 100644 --- a/liblightdm-gobject/language.c +++ b/liblightdm-gobject/language.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010 Robert Ancell. * Author: Robert Ancell - * + * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2 or version 3 of the License. @@ -193,9 +193,9 @@ lightdm_get_languages (void) /** * lightdm_language_get_code: * @language: A #LightDMLanguage - * + * * Get the code of a language (e.g. "de_DE.UTF-8") - * + * * Return value: The code of the language **/ const gchar * @@ -208,7 +208,7 @@ lightdm_language_get_code (LightDMLanguage *language) /** * lightdm_language_get_name: * @language: A #LightDMLanguage - * + * * Get the name of a language. * * Return value: The name of the language @@ -251,9 +251,9 @@ lightdm_language_get_name (LightDMLanguage *language) /** * lightdm_language_get_territory: * @language: A #LightDMLanguage - * + * * Get the territory the language is used in. - * + * * Return value: The territory the language is used in. **/ const gchar * @@ -295,9 +295,9 @@ lightdm_language_get_territory (LightDMLanguage *language) * lightdm_language_matches: * @language: A #LightDMLanguage * @code: A language code - * + * * Check if a language code matches this language. - * + * * Return value: #TRUE if the code matches this language. **/ gboolean @@ -377,7 +377,7 @@ static void lightdm_language_class_init (LightDMLanguageClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + g_type_class_add_private (klass, sizeof (LightDMLanguagePrivate)); object_class->set_property = lightdm_language_set_property; diff --git a/liblightdm-gobject/layout.c b/liblightdm-gobject/layout.c index c0426e35..ccb582f5 100644 --- a/liblightdm-gobject/layout.c +++ b/liblightdm-gobject/layout.c @@ -2,7 +2,7 @@ * * Copyright (C) 2010 Robert Ancell. * Author: Robert Ancell - * + * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2 or version 3 of the License. @@ -117,7 +117,7 @@ lightdm_get_layouts (void) display = XOpenDisplay (NULL); if (display == NULL) return NULL; - + xkl_engine = xkl_engine_get_instance (display); xkl_config = xkl_config_rec_new (); if (!xkl_config_rec_get_from_server (xkl_config, xkl_engine)) @@ -203,9 +203,9 @@ lightdm_get_layout (void) /** * lightdm_layout_get_name: * @layout: A #LightDMLayout - * + * * Get the name of a layout. - * + * * Return value: The name of the layout **/ const gchar * @@ -218,7 +218,7 @@ lightdm_layout_get_name (LightDMLayout *layout) /** * lightdm_layout_get_short_description: * @layout: A #LightDMLayout - * + * * Get the short description of a layout. * * Return value: A short description of the layout @@ -233,9 +233,9 @@ lightdm_layout_get_short_description (LightDMLayout *layout) /** * lightdm_layout_get_description: * @layout: A #LightDMLayout - * + * * Get the long description of a layout. - * + * * Return value: A long description of the layout **/ const gchar * @@ -308,7 +308,7 @@ static void lightdm_layout_class_init (LightDMLayoutClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + g_type_class_add_private (klass, sizeof (LightDMLayoutPrivate)); object_class->set_property = lightdm_layout_set_property; diff --git a/liblightdm-gobject/power.c b/liblightdm-gobject/power.c index b46af0f8..9b2dc172 100644 --- a/liblightdm-gobject/power.c +++ b/liblightdm-gobject/power.c @@ -337,7 +337,7 @@ lightdm_get_can_shutdown (void) * @error: return location for a #GError, or %NULL * * Triggers a system shutdown. - * + * * Return value: #TRUE if shutdown initiated. **/ gboolean diff --git a/liblightdm-gobject/session.c b/liblightdm-gobject/session.c index 2a0be544..d635f330 100644 --- a/liblightdm-gobject/session.c +++ b/liblightdm-gobject/session.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010 Robert Ancell. * Author: Robert Ancell - * + * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2 or version 3 of the License. @@ -37,7 +37,7 @@ static gboolean have_sessions = FALSE; static GList *local_sessions = NULL; static GList *remote_sessions = NULL; -static gint +static gint compare_session (gconstpointer a, gconstpointer b) { LightDMSessionPrivate *priv_a = GET_PRIVATE (a); @@ -52,7 +52,7 @@ load_session (GKeyFile *key_file, const gchar *key) LightDMSession *session; LightDMSessionPrivate *priv; gchar *try_exec; - + if (g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, NULL) || g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL)) return NULL; @@ -170,7 +170,7 @@ load_sessions_dir (GList *sessions, const gchar *sessions_dir) } g_dir_close (directory); - + return sessions; } @@ -185,7 +185,7 @@ load_sessions (const gchar *sessions_dir) for (i = 0; dirs[i]; i++) sessions = load_sessions_dir (sessions, dirs[i]); g_strfreev (dirs); - + return sessions; } @@ -204,7 +204,7 @@ update_sessions (void) /* Use session directory from configuration */ config_load_from_standard_locations (config_get_instance (), NULL, NULL); - + value = config_get_string (config_get_instance (), "LightDM", "sessions-directory"); if (value) { @@ -259,9 +259,9 @@ lightdm_get_remote_sessions (void) /** * lightdm_session_get_key: * @session: A #LightDMSession - * + * * Get the key for a session - * + * * Return value: The session key **/ const gchar * @@ -274,9 +274,9 @@ lightdm_session_get_key (LightDMSession *session) /** * lightdm_session_get_session_type: * @session: A #LightDMSession - * + * * Get the type a session - * + * * Return value: The session type, e.g. x or mir **/ const gchar * @@ -289,9 +289,9 @@ lightdm_session_get_session_type (LightDMSession *session) /** * lightdm_session_get_name: * @session: A #LightDMSession - * + * * Get the name for a session - * + * * Return value: The session name **/ const gchar * @@ -304,9 +304,9 @@ lightdm_session_get_name (LightDMSession *session) /** * lightdm_session_get_comment: * @session: A #LightDMSession - * + * * Get the comment for a session - * + * * Return value: The session comment **/ const gchar * @@ -372,7 +372,7 @@ static void lightdm_session_class_init (LightDMSessionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + g_type_class_add_private (klass, sizeof (LightDMSessionPrivate)); object_class->set_property = lightdm_session_set_property; diff --git a/liblightdm-gobject/user.c b/liblightdm-gobject/user.c index 50f766b0..c4e5661e 100644 --- a/liblightdm-gobject/user.c +++ b/liblightdm-gobject/user.c @@ -4,7 +4,7 @@ * Copyright (C) 2014 Canonical, Ltd. * Authors: Robert Ancell * Michael Terry - * + * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2 or version 3 of the License. @@ -350,9 +350,9 @@ lightdm_user_list_class_init (LightDMUserListClass *klass) /** * lightdm_user_get_name: * @user: A #LightDMUser - * + * * Get the name of a user. - * + * * Return value: The name of the given user **/ const gchar * @@ -365,7 +365,7 @@ lightdm_user_get_name (LightDMUser *user) /** * lightdm_user_get_real_name: * @user: A #LightDMUser - * + * * Get the real name of a user. * * Return value: The real name of the given user @@ -380,9 +380,9 @@ lightdm_user_get_real_name (LightDMUser *user) /** * lightdm_user_get_display_name: * @user: A #LightDMUser - * + * * Get the display name of a user. - * + * * Return value: The display name of the given user **/ const gchar * @@ -395,9 +395,9 @@ lightdm_user_get_display_name (LightDMUser *user) /** * lightdm_user_get_home_directory: * @user: A #LightDMUser - * + * * Get the home directory for a user. - * + * * Return value: The users home directory */ const gchar * @@ -410,9 +410,9 @@ lightdm_user_get_home_directory (LightDMUser *user) /** * lightdm_user_get_image: * @user: A #LightDMUser - * + * * Get the image URI for a user. - * + * * Return value: The image URI for the given user or #NULL if no URI **/ const gchar * @@ -425,9 +425,9 @@ lightdm_user_get_image (LightDMUser *user) /** * lightdm_user_get_background: * @user: A #LightDMUser - * + * * Get the background file path for a user. - * + * * Return value: The background file path for the given user or #NULL if no path **/ const gchar * @@ -440,9 +440,9 @@ lightdm_user_get_background (LightDMUser *user) /** * lightdm_user_get_language: * @user: A #LightDMUser - * + * * Get the language for a user. - * + * * Return value: The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or #NULL if using the system default locale. **/ const gchar * @@ -455,9 +455,9 @@ lightdm_user_get_language (LightDMUser *user) /** * lightdm_user_get_layout: * @user: A #LightDMUser - * + * * Get the keyboard layout for a user. - * + * * Return value: The keyboard layout for the given user or #NULL if using system defaults. Copy the value if you want to use it long term. **/ const gchar * @@ -470,9 +470,9 @@ lightdm_user_get_layout (LightDMUser *user) /** * lightdm_user_get_layouts: * @user: A #LightDMUser - * + * * Get the configured keyboard layouts for a user. - * + * * Return value: (transfer none): A NULL-terminated array of keyboard layouts for the given user. Copy the values if you want to use them long term. **/ const gchar * const * @@ -485,9 +485,9 @@ lightdm_user_get_layouts (LightDMUser *user) /** * lightdm_user_get_session: * @user: A #LightDMUser - * + * * Get the session for a user. - * + * * Return value: The session for the given user or #NULL if using system defaults. **/ const gchar * @@ -500,9 +500,9 @@ lightdm_user_get_session (LightDMUser *user) /** * lightdm_user_get_logged_in: * @user: A #LightDMUser - * + * * Check if a user is logged in. - * + * * Return value: #TRUE if the user is currently logged in. **/ gboolean @@ -515,9 +515,9 @@ lightdm_user_get_logged_in (LightDMUser *user) /** * lightdm_user_get_has_messages: * @user: A #LightDMUser - * + * * Check if a user has waiting messages. - * + * * Return value: #TRUE if the user has waiting messages. **/ gboolean @@ -530,9 +530,9 @@ lightdm_user_get_has_messages (LightDMUser *user) /** * lightdm_user_get_uid: * @user: A #LightDMUser - * + * * Get the uid of a user. - * + * * Return value: The uid of the given user **/ uid_t diff --git a/liblightdm-qt/QLightDM/greeter.h b/liblightdm-qt/QLightDM/greeter.h index 91a2a059..5413db78 100644 --- a/liblightdm-qt/QLightDM/greeter.h +++ b/liblightdm-qt/QLightDM/greeter.h @@ -23,7 +23,7 @@ namespace QLightDM class Q_DECL_EXPORT Greeter : public QObject { Q_OBJECT - + Q_PROPERTY(bool authenticated READ isAuthenticated ) //NOTFIY authenticationComplete Q_PROPERTY(QString authenticationUser READ authenticationUser ) Q_PROPERTY(QString defaultSession READ defaultSessionHint CONSTANT) @@ -33,7 +33,7 @@ class Q_DECL_EXPORT Greeter : public QObject Q_PROPERTY(QString hostname READ hostname CONSTANT) Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT) Q_PROPERTY(bool locked READ lockHint CONSTANT) - + Q_PROPERTY(QString hostname READ hostname CONSTANT) Q_ENUMS(PromptType MessageType) @@ -52,7 +52,7 @@ public: explicit Greeter(QObject* parent=0); virtual ~Greeter(); - QString getHint(const QString &name) const; + QString getHint(const QString &name) const; QString defaultSessionHint() const; bool hideUsersHint() const; bool showManualLoginHint() const; diff --git a/liblightdm-qt/QLightDM/sessionsmodel.h b/liblightdm-qt/QLightDM/sessionsmodel.h index dd200990..45eae846 100644 --- a/liblightdm-qt/QLightDM/sessionsmodel.h +++ b/liblightdm-qt/QLightDM/sessionsmodel.h @@ -45,7 +45,7 @@ namespace QLightDM { protected: SessionsModelPrivate *d_ptr; - + private: Q_DECLARE_PRIVATE(SessionsModel) }; diff --git a/liblightdm-qt/greeter.cpp b/liblightdm-qt/greeter.cpp index 5a52618e..3ef6996b 100644 --- a/liblightdm-qt/greeter.cpp +++ b/liblightdm-qt/greeter.cpp @@ -28,14 +28,14 @@ public: LightDMGreeter *ldmGreeter; protected: Greeter* q_ptr; - + static void cb_showPrompt(LightDMGreeter *greeter, const gchar *text, LightDMPromptType type, gpointer data); static void cb_showMessage(LightDMGreeter *greeter, const gchar *text, LightDMMessageType type, gpointer data); static void cb_authenticationComplete(LightDMGreeter *greeter, gpointer data); static void cb_autoLoginExpired(LightDMGreeter *greeter, gpointer data); static void cb_idle(LightDMGreeter *greeter, gpointer data); static void cb_reset(LightDMGreeter *greeter, gpointer data); - + private: Q_DECLARE_PUBLIC(Greeter) }; @@ -59,10 +59,10 @@ GreeterPrivate::GreeterPrivate(Greeter *parent) : void GreeterPrivate::cb_showPrompt(LightDMGreeter *greeter, const gchar *text, LightDMPromptType type, gpointer data) { Q_UNUSED(greeter); - + GreeterPrivate *that = static_cast(data); QString message = QString::fromUtf8(text); - + Q_EMIT that->q_func()->showPrompt(message, type == LIGHTDM_PROMPT_TYPE_QUESTION ? Greeter::PromptTypeQuestion : Greeter::PromptTypeSecret); } diff --git a/liblightdm-qt/power.cpp b/liblightdm-qt/power.cpp index eb0c82cd..a8cb4fae 100644 --- a/liblightdm-qt/power.cpp +++ b/liblightdm-qt/power.cpp @@ -152,7 +152,7 @@ bool PowerInterface::canRestart() } } qWarning() << d->login1Interface->lastError(); - + QDBusReply reply = d->consoleKitInterface->call("CanRestart"); if (reply.isValid()) { return reply.value(); diff --git a/src/accounts.c b/src/accounts.c index 797b6d9d..d4d54a2e 100644 --- a/src/accounts.c +++ b/src/accounts.c @@ -2,7 +2,7 @@ * * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/accounts.h b/src/accounts.h index a6468570..ba77c0ff 100644 --- a/src/accounts.h +++ b/src/accounts.h @@ -2,7 +2,7 @@ * * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/console-kit.h b/src/console-kit.h index 37252447..1080338e 100644 --- a/src/console-kit.h +++ b/src/console-kit.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/display-manager.c b/src/display-manager.c index 05c46bb0..bf8d24ae 100644 --- a/src/display-manager.c +++ b/src/display-manager.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -125,7 +125,7 @@ display_manager_start (DisplayManager *manager) /* Disable Plymouth if no X servers are replacing it */ if (plymouth_get_is_active ()) { - g_debug ("Stopping Plymouth, no displays replace it"); + g_debug ("Stopping Plymouth, no displays replace it"); plymouth_quit (FALSE); } } @@ -155,7 +155,7 @@ display_manager_stop (DisplayManager *manager) check_stopped (manager); } - + static void display_manager_init (DisplayManager *manager) { diff --git a/src/display-manager.h b/src/display-manager.h index 48ba01f2..c4b7d939 100644 --- a/src/display-manager.h +++ b/src/display-manager.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/display-server.c b/src/display-server.c index ddc476e2..19098d2c 100644 --- a/src/display-server.c +++ b/src/display-server.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/display-server.h b/src/display-server.h index 971151b3..c31d096e 100644 --- a/src/display-server.h +++ b/src/display-server.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/dm-tool.c b/src/dm-tool.c index c0d257c5..fd9d57ea 100644 --- a/src/dm-tool.c +++ b/src/dm-tool.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -76,7 +76,7 @@ get_seat_proxy (void) if (seat_proxy) return seat_proxy; - + if (!g_getenv ("XDG_SEAT_PATH")) { g_printerr ("Not running inside a display manager, XDG_SEAT_PATH not defined\n"); @@ -97,7 +97,7 @@ get_seat_proxy (void) exit (EXIT_FAILURE); } g_clear_error (&error); - + return seat_proxy; } @@ -120,7 +120,7 @@ main (int argc, char **argv) if (!g_str_has_prefix (arg, "-")) break; - + if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0) { g_printerr ("Usage:\n" @@ -179,7 +179,7 @@ main (int argc, char **argv) return EXIT_FAILURE; } g_clear_error (&error); - + command = argv[arg_index]; arg_index++; n_options = argc - arg_index; @@ -429,7 +429,7 @@ main (int argc, char **argv) lock_name = g_strdup_printf ("/tmp/.X%d-lock", xephyr_display_number); has_lock = g_file_test (lock_name, G_FILE_TEST_EXISTS); g_free (lock_name); - + if (has_lock) xephyr_display_number++; else @@ -445,11 +445,11 @@ main (int argc, char **argv) } else if (strcmp (dimensions, "fullscreen") == 0) { - xephyr_command = g_strdup_printf ("Xephyr :%d -fullscreen", xephyr_display_number); + xephyr_command = g_strdup_printf ("Xephyr :%d -fullscreen", xephyr_display_number); } else { - xephyr_command = g_strdup_printf ("Xephyr :%d -screen %s", xephyr_display_number, dimensions); + xephyr_command = g_strdup_printf ("Xephyr :%d -screen %s", xephyr_display_number, dimensions); } if (!g_shell_parse_argv (xephyr_command, NULL, &xephyr_argv, &error) || !g_spawn_async (NULL, xephyr_argv, NULL, @@ -503,7 +503,7 @@ main (int argc, char **argv) g_variant_get (result, "(&o)", &path); g_print ("%s\n", path); - return EXIT_SUCCESS; + return EXIT_SUCCESS; } else if (strcmp (command, "add-seat") == 0) { @@ -521,7 +521,7 @@ main (int argc, char **argv) type = options[0]; properties = g_variant_builder_new (G_VARIANT_TYPE ("a(ss)")); - + for (i = 1; i < n_options; i++) { gchar *property, *name, *value; @@ -540,7 +540,7 @@ main (int argc, char **argv) g_variant_builder_add_value (properties, g_variant_new ("(ss)", name, value)); g_free (property); } - + result = g_dbus_proxy_call_sync (dm_proxy, "AddSeat", g_variant_new ("(sa(ss))", type, properties), diff --git a/src/greeter.c b/src/greeter.c index ba69febe..980fa8eb 100644 --- a/src/greeter.c +++ b/src/greeter.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -44,11 +44,11 @@ struct GreeterPrivate guint8 *read_buffer; gsize n_read; gboolean use_secure_memory; - + /* Hints for the greeter */ GHashTable *hints; - /* Default session to use */ + /* Default session to use */ gchar *default_session; /* Sequence number of current PAM session */ @@ -226,7 +226,7 @@ static void write_string (guint8 *buffer, gint buffer_length, const gchar *value, gsize *offset) { gint length; - + if (value) length = strlen (value); else @@ -307,7 +307,7 @@ pam_messages_cb (Session *session, Greeter *greeter) size = int_length () + string_length (session_get_username (session)) + int_length (); for (i = 0; i < messages_length; i++) size += int_length () + string_length (messages[i].msg); - + write_header (message, MAX_MESSAGE_LENGTH, SERVER_MESSAGE_PROMPT_AUTHENTICATION, size, &offset); write_int (message, MAX_MESSAGE_LENGTH, greeter->priv->authentication_sequence_number, &offset); write_string (message, MAX_MESSAGE_LENGTH, session_get_username (session), &offset); @@ -343,7 +343,7 @@ send_end_authentication (Greeter *greeter, guint32 sequence_number, const gchar write_int (message, MAX_MESSAGE_LENGTH, sequence_number, &offset); write_string (message, MAX_MESSAGE_LENGTH, username, &offset); write_int (message, MAX_MESSAGE_LENGTH, result, &offset); - write_message (greeter, message, offset); + write_message (greeter, message, offset); } void @@ -484,7 +484,7 @@ handle_login_as_guest (Greeter *greeter, guint32 sequence_number) return; } - greeter->priv->guest_account_authenticated = TRUE; + greeter->priv->guest_account_authenticated = TRUE; send_end_authentication (greeter, sequence_number, "", PAM_SUCCESS); } @@ -801,7 +801,7 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data) greeter->priv->from_greeter_watch = 0; return FALSE; } - + n_to_read = HEADER_SIZE; if (greeter->priv->n_read >= HEADER_SIZE) { @@ -837,9 +837,9 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data) greeter->priv->read_buffer = secure_realloc (greeter, greeter->priv->read_buffer, n_to_read); read_cb (source, condition, greeter); return TRUE; - } + } } - + offset = 0; id = read_int (greeter, &offset); length = HEADER_SIZE + read_int (greeter, &offset); diff --git a/src/greeter.h b/src/greeter.h index 3aa126d6..47929ac1 100644 --- a/src/greeter.h +++ b/src/greeter.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/guest-account.c b/src/guest-account.c index 14cd87c5..77c4594b 100644 --- a/src/guest-account.c +++ b/src/guest-account.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -20,7 +20,7 @@ get_setup_script (void) { gchar *script; static gchar *setup_script = NULL; - + if (setup_script) return setup_script; @@ -30,7 +30,7 @@ get_setup_script (void) setup_script = g_find_program_in_path (script); g_free (script); - + return setup_script; } @@ -55,7 +55,7 @@ run_script (const gchar *script, gchar **stdout_text, gint *exit_status, GError NULL, NULL, stdout_text, NULL, exit_status, error); g_strfreev (argv); - + return result; } @@ -98,7 +98,7 @@ guest_account_setup (void) g_debug ("Guest account setup script didn't return a username"); return NULL; } - + g_debug ("Guest account %s setup", username); return username; diff --git a/src/guest-account.h b/src/guest-account.h index 70f900da..9de60fdc 100644 --- a/src/guest-account.h +++ b/src/guest-account.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/lightdm-guest-session.c b/src/lightdm-guest-session.c index 6897a65a..8f2552e2 100644 --- a/src/lightdm-guest-session.c +++ b/src/lightdm-guest-session.c @@ -2,7 +2,7 @@ * * Copyright (C) 2011 Canonical Ltd. * Author: Martin Pitt - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/lightdm.c b/src/lightdm.c index a5c1e017..f48af8bb 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -569,7 +569,7 @@ emit_object_value_changed (GDBusConnection *bus, const gchar *path, const gchar g_variant_new ("(sa{sv}as)", interface_name, &builder, NULL), &error)) g_warning ("Failed to emit PropertiesChanged signal: %s", error->message); - g_clear_error (&error); + g_clear_error (&error); } static void @@ -585,7 +585,7 @@ emit_object_signal (GDBusConnection *bus, const gchar *path, const gchar *signal g_variant_new ("(o)", object_path), &error)) g_warning ("Failed to emit %s signal on %s: %s", signal_name, path, error->message); - g_clear_error (&error); + g_clear_error (&error); } static void @@ -1001,7 +1001,7 @@ add_login1_seat (Login1Seat *login1_seat) g_free (config_section); g_object_unref (seat); - + return started; } diff --git a/src/login1.c b/src/login1.c index ad922a5a..f799e3ed 100644 --- a/src/login1.c +++ b/src/login1.c @@ -227,11 +227,11 @@ signal_cb (GDBusConnection *connection, seat = login1_service_get_seat (service, id); if (seat) { - service->priv->seats = g_list_remove (service->priv->seats, seat); + service->priv->seats = g_list_remove (service->priv->seats, seat); g_signal_emit (service, service_signals[SEAT_REMOVED], 0, seat); g_object_unref (seat); - } - } + } + } } gboolean diff --git a/src/login1.h b/src/login1.h index 416632f7..af9f2a96 100644 --- a/src/login1.h +++ b/src/login1.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/mir-server.c b/src/mir-server.c index 69a492d6..36e0e770 100644 --- a/src/mir-server.c +++ b/src/mir-server.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -28,7 +28,7 @@ G_DEFINE_TYPE (MirServer, mir_server, DISPLAY_SERVER_TYPE); MirServer *mir_server_new (void) { - return g_object_new (MIR_SERVER_TYPE, NULL); + return g_object_new (MIR_SERVER_TYPE, NULL); } void diff --git a/src/mir-server.h b/src/mir-server.h index 3e7bc0bb..4f59623f 100644 --- a/src/mir-server.h +++ b/src/mir-server.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/plymouth.c b/src/plymouth.c index aefb81a9..03b31127 100644 --- a/src/plymouth.c +++ b/src/plymouth.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/plymouth.h b/src/plymouth.h index f8f90f6f..e8277b20 100644 --- a/src/plymouth.h +++ b/src/plymouth.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/process.c b/src/process.c index 4328dcd0..adb06f78 100644 --- a/src/process.c +++ b/src/process.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -24,7 +24,7 @@ enum { GOT_DATA, - GOT_SIGNAL, + GOT_SIGNAL, STOPPED, LAST_SIGNAL }; @@ -51,7 +51,7 @@ struct ProcessPrivate /* Process ID */ GPid pid; - + /* Exit status of process */ int exit_status; @@ -121,7 +121,7 @@ process_set_env (Process *process, const gchar *name, const gchar *value) { g_return_if_fail (process != NULL); g_return_if_fail (name != NULL); - g_hash_table_insert (process->priv->env, g_strdup (name), g_strdup (value)); + g_hash_table_insert (process->priv->env, g_strdup (name), g_strdup (value)); } const gchar * @@ -163,7 +163,7 @@ process_watch_cb (GPid pid, gint status, gpointer data) if (process->priv->quit_timeout) g_source_remove (process->priv->quit_timeout); - process->priv->quit_timeout = 0; + process->priv->quit_timeout = 0; process->priv->pid = 0; g_hash_table_remove (processes, GINT_TO_POINTER (pid)); @@ -183,7 +183,7 @@ process_start (Process *process, gboolean block) GError *error = NULL; g_return_val_if_fail (process != NULL, FALSE); - g_return_val_if_fail (process->priv->command != NULL, FALSE); + g_return_val_if_fail (process->priv->command != NULL, FALSE); g_return_val_if_fail (process->priv->pid == 0, FALSE); if (!g_shell_parse_argv (process->priv->command, &argc, &argv, &error)) @@ -244,11 +244,11 @@ process_start (Process *process, gboolean block) #endif for (i = 0; i < env_length; i++) setenv (env_keys[i], env_values[i], TRUE); - + execvp (argv[0], argv); _exit (EXIT_FAILURE); } - + close (log_fd); g_strfreev (argv); g_free (env_keys); @@ -269,7 +269,7 @@ process_start (Process *process, gboolean block) int exit_status; waitpid (process->priv->pid, &exit_status, 0); process_watch_cb (process->priv->pid, exit_status, process); - } + } else { g_hash_table_insert (processes, GINT_TO_POINTER (process->priv->pid), g_object_ref (process)); @@ -402,7 +402,7 @@ handle_signal (GIOChannel *source, GIOCondition condition, gpointer data) Process *process; errno = 0; - if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) || + if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) || read (signal_pipe[0], &pid, sizeof (pid_t)) != sizeof (pid_t)) { g_warning ("Error reading from signal pipe: %s", strerror (errno)); @@ -427,7 +427,7 @@ process_class_init (ProcessClass *klass) struct sigaction action; klass->stopped = process_stopped; - object_class->finalize = process_finalize; + object_class->finalize = process_finalize; g_type_class_add_private (klass, sizeof (ProcessPrivate)); @@ -438,7 +438,7 @@ process_class_init (ProcessClass *klass) G_STRUCT_OFFSET (ProcessClass, got_data), NULL, NULL, NULL, - G_TYPE_NONE, 0); + G_TYPE_NONE, 0); signals[GOT_SIGNAL] = g_signal_new ("got-signal", G_TYPE_FROM_CLASS (klass), diff --git a/src/process.h b/src/process.h index 1fcde7a8..d15477b1 100644 --- a/src/process.h +++ b/src/process.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/seat-unity.c b/src/seat-unity.c index d08c2b23..bc08437d 100644 --- a/src/seat-unity.c +++ b/src/seat-unity.c @@ -107,7 +107,7 @@ compositor_ready_cb (UnitySystemCompositor *compositor, SeatUnity *seat) result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error); if (error) l_debug (seat, "Error getting key %s", error->message); - g_clear_error (&error); + g_clear_error (&error); if (result) { @@ -216,7 +216,7 @@ create_x_server (Seat *seat) layout = seat_get_string_property (seat, "xserver-layout"); if (layout) x_server_local_set_layout (x_server, layout); - + x_server_local_set_xdg_seat (x_server, seat_get_name (seat)); config_file = seat_get_string_property (seat, "xserver-config"); @@ -242,9 +242,9 @@ create_mir_server (Seat *seat) static DisplayServer * seat_unity_create_display_server (Seat *seat, Session *session) -{ +{ const gchar *session_type; - + session_type = session_get_session_type (session); if (strcmp (session_type, "x") == 0) return DISPLAY_SERVER (create_x_server (seat)); diff --git a/src/seat-xdmcp-session.c b/src/seat-xdmcp-session.c index 5aebef9a..7621a97b 100644 --- a/src/seat-xdmcp-session.c +++ b/src/seat-xdmcp-session.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/seat-xdmcp-session.h b/src/seat-xdmcp-session.h index a72a09ce..5f244205 100644 --- a/src/seat-xdmcp-session.h +++ b/src/seat-xdmcp-session.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/seat-xlocal.c b/src/seat-xlocal.c index acc39e1c..04a76982 100644 --- a/src/seat-xlocal.c +++ b/src/seat-xlocal.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -51,7 +51,7 @@ xdmcp_x_server_stopped_cb (DisplayServer *display_server, Seat *seat) g_signal_handlers_disconnect_matched (SEAT_XLOCAL (seat)->priv->xdmcp_x_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat); SEAT_XLOCAL (seat)->priv->xdmcp_x_server = NULL; g_object_unref (display_server); - + if (seat_get_is_stopping (seat)) check_stopped (SEAT_XLOCAL (seat)); else @@ -90,7 +90,7 @@ seat_xlocal_start (Seat *seat) result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error); if (error) l_debug (seat, "Error getting key %s", error->message); - g_clear_error (&error); + g_clear_error (&error); if (result) { @@ -203,9 +203,9 @@ create_x_server (Seat *seat) config_file = seat_get_string_property (seat, "xserver-config"); if (config_file) x_server_local_set_config (x_server, config_file); - + allow_tcp = seat_get_boolean_property (seat, "xserver-allow-tcp"); - x_server_local_set_allow_tcp (x_server, allow_tcp); + x_server_local_set_allow_tcp (x_server, allow_tcp); return x_server; } @@ -232,7 +232,7 @@ create_unity_system_compositor (Seat *seat) vt = get_vt (seat, DISPLAY_SERVER (compositor)); if (vt >= 0) unity_system_compositor_set_vt (compositor, vt); - + for (i = 0; ; i++) { socket_name = g_strdup_printf ("/run/lightdm-mir-%d", i); @@ -266,7 +266,7 @@ seat_xlocal_create_display_server (Seat *seat, Session *session) compositor_command = session_config_get_compositor_command (session_get_config (session)); if (compositor_command) unity_system_compositor_set_command (UNITY_SYSTEM_COMPOSITOR (compositor), compositor_command); - + return compositor; } else diff --git a/src/seat-xlocal.h b/src/seat-xlocal.h index 41fdb74f..c60ecdf4 100644 --- a/src/seat-xlocal.h +++ b/src/seat-xlocal.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/seat-xremote.c b/src/seat-xremote.c index d7af16aa..1a46f401 100644 --- a/src/seat-xremote.c +++ b/src/seat-xremote.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -79,7 +79,7 @@ seat_xremote_run_script (Seat *seat, DisplayServer *display_server, Process *scr XServerRemote *x_server; x_server = X_SERVER_REMOTE (display_server); - process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server))); + process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server))); process_set_env (script, "REMOTE_HOST", x_server_get_hostname (X_SERVER (x_server))); SEAT_CLASS (seat_xremote_parent_class)->run_script (seat, display_server, script); diff --git a/src/seat-xremote.h b/src/seat-xremote.h index dd96462d..2e14d36c 100644 --- a/src/seat-xremote.h +++ b/src/seat-xremote.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/seat-xvnc.c b/src/seat-xvnc.c index fa7737ec..00f5f693 100644 --- a/src/seat-xvnc.c +++ b/src/seat-xvnc.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -41,7 +41,7 @@ seat_xvnc_create_display_server (Seat *seat, Session *session) if (strcmp (session_get_session_type (session), "x") != 0) return NULL; - + x_server = x_server_xvnc_new (); x_server_xvnc_set_socket (x_server, g_socket_get_fd (SEAT_XVNC (seat)->priv->connection)); diff --git a/src/seat-xvnc.h b/src/seat-xvnc.h index 2e4c5291..f96e590a 100644 --- a/src/seat-xvnc.h +++ b/src/seat-xvnc.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/seat.c b/src/seat.c index c115aa18..529774e9 100644 --- a/src/seat.c +++ b/src/seat.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -56,7 +56,7 @@ struct SeatPrivate /* The session to set active when it starts */ Session *session_to_activate; - + /* TRUE once we have started */ gboolean started; @@ -106,7 +106,7 @@ seat_new (const gchar *module_name, const gchar *name) { Seat *seat; SeatModule *m = NULL; - + g_return_val_if_fail (module_name != NULL, NULL); if (seat_modules) @@ -288,7 +288,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name, { Process *script; gboolean result = FALSE; - + script = process_new (NULL, NULL); process_set_command (script, script_name); @@ -338,7 +338,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name, static void seat_real_run_script (Seat *seat, DisplayServer *display_server, Process *process) -{ +{ } static void @@ -476,7 +476,7 @@ find_resettable_greeter (Seat *seat) static void set_greeter_hints (Seat *seat, Greeter *greeter_session) { - greeter_clear_hints (greeter_session); + greeter_clear_hints (greeter_session); greeter_set_hint (greeter_session, "default-session", seat_get_string_property (seat, "user-session")); greeter_set_hint (greeter_session, "hide-users", seat_get_boolean_property (seat, "greeter-hide-users") ? "true" : "false"); greeter_set_hint (greeter_session, "show-manual-login", seat_get_boolean_property (seat, "greeter-show-manual-login") ? "true" : "false"); @@ -893,7 +893,7 @@ get_session_argv (Seat *seat, SessionConfig *session_config, const gchar *sessio g_free (argv[0]); argv[0] = path; } - + return argv; } @@ -1051,7 +1051,7 @@ create_guest_session (Seat *seat, const gchar *session_name) session_set_argv (session, argv); g_strfreev (argv); g_object_unref (session_config); - + return session; } @@ -1091,7 +1091,7 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi gchar **argv; session = greeter_get_authentication_session (greeter); - + /* Get session command to run */ switch (type) { @@ -1215,14 +1215,14 @@ create_greeter_session (Seat *seat) g_signal_connect (greeter_session, "notify::active-username", G_CALLBACK (greeter_active_username_changed_cb), seat); g_signal_connect (greeter_session, "authentication-complete", G_CALLBACK (session_authentication_complete_cb), seat); g_signal_connect (greeter_session, "stopped", G_CALLBACK (session_stopped_cb), seat); - + set_session_env (SESSION (greeter_session)); session_set_env (SESSION (greeter_session), "XDG_SESSION_CLASS", "greeter"); session_set_pam_service (SESSION (greeter_session), seat_get_string_property (seat, "pam-greeter-service")); if (getuid () == 0) { - gchar *greeter_user; + gchar *greeter_user; greeter_user = config_get_string (config_get_instance (), "LightDM", "greeter-user"); session_set_username (SESSION (greeter_session), greeter_user); g_free (greeter_user); @@ -1634,7 +1634,7 @@ seat_real_start (Seat *seat) background_session = session; session = NULL; } - + if (session) { DisplayServer *display_server; @@ -1796,7 +1796,7 @@ seat_finalize (GObject *object) { DisplayServer *display_server = link->data; g_signal_handlers_disconnect_matched (display_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self); - } + } g_list_free_full (self->priv->display_servers, g_object_unref); for (link = self->priv->sessions; link; link = link->next) { diff --git a/src/seat.h b/src/seat.h index ef9c8cb0..50de1eb4 100644 --- a/src/seat.h +++ b/src/seat.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/session-child.c b/src/session-child.c index 98a973c0..c6f8a7ce 100644 --- a/src/session-child.c +++ b/src/session-child.c @@ -67,7 +67,7 @@ read_data (void *buf, size_t count) n_read = read (from_daemon_output, buf, count); if (n_read < 0) g_printerr ("Error reading from daemon: %s\n", strerror (errno)); - + return n_read; } @@ -86,10 +86,10 @@ read_string_full (void* (*alloc_fn)(size_t n)) g_printerr ("Invalid string length %d from daemon\n", length); return NULL; } - + value = (*alloc_fn) (sizeof (char) * (length + 1)); read_data (value, length); - value[length] = '\0'; + value[length] = '\0'; return value; } @@ -216,7 +216,7 @@ updwtmpx (const gchar *wtmp_file, struct utmpx *ut) strncpy (u.ut_host, ut->ut_host, sizeof (u.ut_host)); u.ut_tv.tv_sec = ut->ut_tv.tv_sec; u.ut_tv.tv_usec = ut->ut_tv.tv_usec; - + updwtmp (wtmp_file, &u); } @@ -329,7 +329,7 @@ session_child_run (int argc, char **argv) pam_set_item (pam_handle, PAM_TTY, xdisplay); } else if (tty) - pam_set_item (pam_handle, PAM_TTY, tty); + pam_set_item (pam_handle, PAM_TTY, tty); #ifdef PAM_XAUTHDATA if (x_authority) @@ -457,7 +457,7 @@ session_child_run (int argc, char **argv) if (version >= 1) { g_free (tty); - tty = read_string (); + tty = read_string (); } x_authority_filename = read_string (); if (version >= 1) @@ -501,7 +501,7 @@ session_child_run (int argc, char **argv) } else { - fd = open ("/dev/null", O_WRONLY); + fd = open ("/dev/null", O_WRONLY); dup2 (fd, STDERR_FILENO); close (fd); } @@ -524,7 +524,7 @@ session_child_run (int argc, char **argv) pam_end (pam_handle, 0); return EXIT_FAILURE; } - + /* Open the session */ result = pam_open_session (pam_handle, 0); if (result != PAM_SUCCESS) diff --git a/src/session-child.h b/src/session-child.h index 49d7051e..cf563941 100644 --- a/src/session-child.h +++ b/src/session-child.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/session-config.h b/src/session-config.h index 25e8002b..a86dc56d 100644 --- a/src/session-config.h +++ b/src/session-config.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2013 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/session.c b/src/session.c index 5169bbda..a1e88937 100644 --- a/src/session.c +++ b/src/session.c @@ -310,7 +310,7 @@ session_get_env (Session *session, const gchar *name) link = find_env_entry (session, name); if (!link) return NULL; - + entry = link->data; return entry + strlen (name) + 1; @@ -322,7 +322,7 @@ session_unset_env (Session *session, const gchar *name) GList *link; g_return_if_fail (session != NULL); - + link = find_env_entry (session, name); if (!link) return; diff --git a/src/session.h b/src/session.h index e820e137..b79a53d8 100644 --- a/src/session.h +++ b/src/session.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/shared-data-manager.c b/src/shared-data-manager.c index c2892212..5b667647 100644 --- a/src/shared-data-manager.c +++ b/src/shared-data-manager.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2014 Canonical, Ltd * Author: Michael Terry - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -93,7 +93,7 @@ shared_data_manager_ensure_user_dir (SharedDataManager *manager, const gchar *us entry = getpwnam (user); if (!entry) return NULL; - + path = g_build_filename (USERS_DIR, user, NULL); file = g_file_new_for_path (path); @@ -107,7 +107,7 @@ shared_data_manager_ensure_user_dir (SharedDataManager *manager, const gchar *us else g_warning ("Could not create user data directory %s: %s", path, error->message); } - g_clear_error (&error); + g_clear_error (&error); if (!result) { g_object_unref (file); diff --git a/src/shared-data-manager.h b/src/shared-data-manager.h index 763330c8..7b60e8f0 100644 --- a/src/shared-data-manager.h +++ b/src/shared-data-manager.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2014 Canonical, Ltd * Author: Michael Terry - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/unity-system-compositor.c b/src/unity-system-compositor.c index 70c5d17a..40502557 100644 --- a/src/unity-system-compositor.c +++ b/src/unity-system-compositor.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2013 Canonical Ltd. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -238,7 +238,7 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data) gsize n_to_read = 0; guint16 id, payload_length; /*guint8 *payload;*/ - + if (condition == G_IO_HUP) { l_debug (compositor, "Compositor closed communication channel"); @@ -459,7 +459,7 @@ unity_system_compositor_start (DisplayServer *server) return TRUE; } - + static void unity_system_compositor_stop (DisplayServer *server) { @@ -481,7 +481,7 @@ unity_system_compositor_finalize (GObject *object) { UnitySystemCompositor *self; - self = UNITY_SYSTEM_COMPOSITOR (object); + self = UNITY_SYSTEM_COMPOSITOR (object); if (self->priv->process) { @@ -497,7 +497,7 @@ unity_system_compositor_finalize (GObject *object) close (self->priv->from_compositor_pipe[0]); close (self->priv->from_compositor_pipe[1]); g_io_channel_unref (self->priv->from_compositor_channel); - if (self->priv->from_compositor_watch) + if (self->priv->from_compositor_watch) g_source_remove (self->priv->from_compositor_watch); g_free (self->priv->read_buffer); if (self->priv->timeout_source) diff --git a/src/unity-system-compositor.h b/src/unity-system-compositor.h index 5354429d..cfd0d4d2 100644 --- a/src/unity-system-compositor.h +++ b/src/unity-system-compositor.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2013 Canonical Ltd. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/vnc-server.c b/src/vnc-server.c index b265e287..1755ffdb 100644 --- a/src/vnc-server.c +++ b/src/vnc-server.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -82,7 +82,7 @@ open_tcp_socket (GSocketFamily family, guint port, GError **error) { GSocket *socket; GSocketAddress *address; - + socket = g_socket_new (family, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_TCP, error); if (!socket) return NULL; @@ -105,19 +105,19 @@ vnc_server_start (VNCServer *server) GError *error = NULL; g_return_val_if_fail (server != NULL, FALSE); - + server->priv->socket = open_tcp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error); if (error) g_warning ("Failed to create IPv4 VNC socket: %s", error->message); g_clear_error (&error); - + if (server->priv->socket) { source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL); g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL); g_source_attach (source, NULL); } - + server->priv->socket6 = open_tcp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error); if (error) g_warning ("Failed to create IPv6 VNC socket: %s", error->message); @@ -149,13 +149,13 @@ vnc_server_finalize (GObject *object) VNCServer *self; self = VNC_SERVER (object); - + if (self->priv->socket) g_object_unref (self->priv->socket); if (self->priv->socket6) g_object_unref (self->priv->socket6); - - G_OBJECT_CLASS (vnc_server_parent_class)->finalize (object); + + G_OBJECT_CLASS (vnc_server_parent_class)->finalize (object); } static void @@ -163,7 +163,7 @@ vnc_server_class_init (VNCServerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = vnc_server_finalize; + object_class->finalize = vnc_server_finalize; g_type_class_add_private (klass, sizeof (VNCServerPrivate)); diff --git a/src/vnc-server.h b/src/vnc-server.h index 83f01cbb..109dc904 100644 --- a/src/vnc-server.h +++ b/src/vnc-server.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/vt.c b/src/vt.c index fa0a0448..92158902 100644 --- a/src/vt.c +++ b/src/vt.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -88,7 +88,7 @@ vt_set_active (gint number) /* Pretend always active */ if (getuid () != 0) - return; + return; console_fd = open_console (); if (console_fd >= 0) @@ -147,7 +147,7 @@ vt_get_unused (void) number = vt_get_min (); while (vt_is_used (number)) number++; - + return number; } @@ -155,7 +155,7 @@ void vt_ref (gint number) { g_debug ("Using VT %d", number); - used_vts = g_list_append (used_vts, GINT_TO_POINTER (number)); + used_vts = g_list_append (used_vts, GINT_TO_POINTER (number)); } void diff --git a/src/vt.h b/src/vt.h index f57ebb4d..a731beca 100644 --- a/src/vt.h +++ b/src/vt.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/x-authority.c b/src/x-authority.c index 1b18ab0e..25f66438 100644 --- a/src/x-authority.c +++ b/src/x-authority.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -27,7 +27,7 @@ struct XAuthorityPrivate /* Address of the X server (format dependent on family) */ guint8 *address; gsize address_length; - + /* Display number of X server */ gchar *number; @@ -46,7 +46,7 @@ x_authority_new (guint16 family, const guint8 *address, gsize address_length, co { XAuthority *auth = g_object_new (X_AUTHORITY_TYPE, NULL); - x_authority_set_family (auth, family); + x_authority_set_family (auth, family); x_authority_set_address (auth, address, address_length); x_authority_set_number (auth, number); x_authority_set_authorization_name (auth, name); @@ -60,7 +60,7 @@ x_authority_new_cookie (guint16 family, const guint8 *address, gsize address_len { guint8 cookie[16]; gint i; - + for (i = 0; i < 16; i++) cookie[i] = g_random_int () & 0xFF; @@ -193,7 +193,7 @@ read_data (gchar *data, gsize data_length, gsize *offset, guint16 length, guint8 if (data_length - *offset < length) return FALSE; - + *value = g_malloc0 (length + 1); for (i = 0; i < length; i++) (*value)[i] = data[*offset + i]; @@ -360,7 +360,7 @@ x_authority_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, } return TRUE; -} +} static void x_authority_init (XAuthority *auth) @@ -381,7 +381,7 @@ x_authority_finalize (GObject *object) g_free (self->priv->authorization_name); g_free (self->priv->authorization_data); - G_OBJECT_CLASS (x_authority_parent_class)->finalize (object); + G_OBJECT_CLASS (x_authority_parent_class)->finalize (object); } static void diff --git a/src/x-authority.h b/src/x-authority.h index d7dacb62..101cb1ca 100644 --- a/src/x-authority.h +++ b/src/x-authority.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -47,7 +47,7 @@ typedef enum { XAUTH_WRITE_MODE_REPLACE, XAUTH_WRITE_MODE_REMOVE, - XAUTH_WRITE_MODE_SET + XAUTH_WRITE_MODE_SET } XAuthWriteMode; GType x_authority_get_type (void); diff --git a/src/x-server-local.c b/src/x-server-local.c index d908f2ad..3f58e0b7 100644 --- a/src/x-server-local.c +++ b/src/x-server-local.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -36,7 +36,7 @@ struct XServerLocalPrivate /* Server layout to use */ gchar *layout; - + /* Value for -seat argument */ gchar *xdg_seat; @@ -113,7 +113,7 @@ display_number_in_use (guint display_number) } g_free (path); - + return in_use; } @@ -289,7 +289,7 @@ x_server_local_set_mir_id (XServerLocal *server, const gchar *id) const gchar *x_server_local_get_mir_id (XServerLocal *server) { g_return_val_if_fail (server != NULL, NULL); - return server->priv->mir_id; + return server->priv->mir_id; } void @@ -376,7 +376,7 @@ stopped_cb (Process *process, XServerLocal *server) server->priv->have_vt_ref = FALSE; } x_server_local_release_display_number (x_server_get_display_number (X_SERVER (server))); - + if (x_server_get_authority (X_SERVER (server)) && server->priv->authority_file) { l_debug (server, "Removing X server authority %s", server->priv->authority_file); @@ -404,7 +404,7 @@ write_authority_file (XServerLocal *server) if (!server->priv->authority_file) { gchar *run_dir, *dir; - + run_dir = config_get_string (config_get_instance (), "LightDM", "run-directory"); dir = g_build_filename (run_dir, "root", NULL); g_free (run_dir); @@ -469,7 +469,7 @@ x_server_local_start (DisplayServer *display_server) if (server->priv->layout) g_string_append_printf (command, " -layout %s", server->priv->layout); - + if (server->priv->xdg_seat) g_string_append_printf (command, " -seat %s", server->priv->xdg_seat); @@ -543,7 +543,7 @@ x_server_local_start (DisplayServer *display_server) return result; } - + static void x_server_local_stop (DisplayServer *server) { @@ -563,9 +563,9 @@ x_server_local_finalize (GObject *object) { XServerLocal *self; - self = X_SERVER_LOCAL (object); + self = X_SERVER_LOCAL (object); - if (self->priv->x_server_process) + if (self->priv->x_server_process) { g_signal_handlers_disconnect_matched (self->priv->x_server_process, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self); g_object_unref (self->priv->x_server_process); diff --git a/src/x-server-local.h b/src/x-server-local.h index 1dca0235..23c1d9a9 100644 --- a/src/x-server-local.h +++ b/src/x-server-local.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/x-server-remote.c b/src/x-server-remote.c index 5fc7ae95..1d1bc2a5 100644 --- a/src/x-server-remote.c +++ b/src/x-server-remote.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/x-server-remote.h b/src/x-server-remote.h index 70f8baad..024b8c3b 100644 --- a/src/x-server-remote.h +++ b/src/x-server-remote.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/x-server-xvnc.c b/src/x-server-xvnc.c index 884489dd..cea1782a 100644 --- a/src/x-server-xvnc.c +++ b/src/x-server-xvnc.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -35,7 +35,7 @@ struct XServerXVNCPrivate /* File descriptor to use for standard input */ gint socket_fd; - + /* Geometry and colour depth */ gint width, height, depth; @@ -237,10 +237,10 @@ x_server_xvnc_start (DisplayServer *display_server) if (error) l_warning (display_server, "Failed to write authority: %s", error->message); g_clear_error (&error); - + command = g_string_new (absolute_command); g_free (absolute_command); - + g_string_append_printf (command, " :%d", x_server_get_display_number (X_SERVER (server))); g_string_append_printf (command, " -auth %s", server->priv->authority_file); g_string_append (command, " -inetd -nolisten tcp"); @@ -271,7 +271,7 @@ x_server_xvnc_start (DisplayServer *display_server) return result; } - + static void x_server_xvnc_stop (DisplayServer *server) { diff --git a/src/x-server-xvnc.h b/src/x-server-xvnc.h index d99ffe70..4a7bc54c 100644 --- a/src/x-server-xvnc.h +++ b/src/x-server-xvnc.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/x-server.c b/src/x-server.c index c23fe1f9..10ba903a 100644 --- a/src/x-server.c +++ b/src/x-server.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -17,7 +17,7 @@ #include "configuration.h" struct XServerPrivate -{ +{ /* Host running the server */ gchar *hostname; @@ -80,7 +80,7 @@ x_server_get_address (XServer *server) server->priv->address = g_strdup_printf("%s:%d", server->priv->hostname, server->priv->number); else server->priv->address = g_strdup_printf(":%d", server->priv->number); - } + } return server->priv->address; } @@ -132,7 +132,7 @@ x_server_start (DisplayServer *display_server) auth = &a; } - /* Open connection */ + /* Open connection */ l_debug (server, "Connecting to XServer %s", x_server_get_address (server)); server->priv->connection = xcb_connect_to_display_with_auth_info (x_server_get_address (server), auth, NULL); if (xcb_connection_has_error (server->priv->connection)) @@ -224,7 +224,7 @@ x_server_class_init (XServerClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); DisplayServerClass *display_server_class = DISPLAY_SERVER_CLASS (klass); - display_server_class->get_session_type = x_server_get_session_type; + display_server_class->get_session_type = x_server_get_session_type; display_server_class->get_can_share = x_server_get_can_share; display_server_class->start = x_server_start; display_server_class->connect_session = x_server_connect_session; diff --git a/src/x-server.h b/src/x-server.h index ef8ce627..2760b8a2 100644 --- a/src/x-server.h +++ b/src/x-server.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/xdmcp-protocol.c b/src/xdmcp-protocol.c index 698edba9..eb5517fb 100644 --- a/src/xdmcp-protocol.c +++ b/src/xdmcp-protocol.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -187,7 +187,7 @@ xdmcp_packet_decode (const guint8 *data, gsize data_length) length = read_card16 (&reader); if (reader.overflow) - { + { g_warning ("Ignoring short packet"); // FIXME: Use GError return NULL; } @@ -351,7 +351,7 @@ xdmcp_packet_encode (XDMCPPacket *packet, guint8 *data, gsize max_length) write_string (&writer, packet->Request.manufacturer_display_id); break; case XDMCP_Accept: - write_card32 (&writer, packet->Accept.session_id); + write_card32 (&writer, packet->Accept.session_id); write_string (&writer, packet->Accept.authentication_name); write_data (&writer, &packet->Accept.authentication_data); write_string (&writer, packet->Accept.authorization_name); @@ -399,7 +399,7 @@ xdmcp_packet_encode (XDMCPPacket *packet, guint8 *data, gsize max_length) g_warning ("Overflow writing response"); return -1; } - + return length + 6; } @@ -425,8 +425,8 @@ string_list_tostring (gchar **strings) GString *s; gchar *string; gchar **i; - - s = g_string_new (""); + + s = g_string_new (""); for (i = strings; *i; i++) { if (i != strings) @@ -474,7 +474,7 @@ xdmcp_packet_tostring (XDMCPPacket *packet) packet->Willing.authentication_name, packet->Willing.hostname, packet->Willing.status); case XDMCP_Unwilling: return g_strdup_printf ("Unwilling(hostname='%s' status='%s')", - packet->Unwilling.hostname, packet->Unwilling.status); + packet->Unwilling.hostname, packet->Unwilling.status); case XDMCP_Request: t = string_list_tostring (packet->Request.authorization_names); t2 = data_tostring (&packet->Request.authentication_data); diff --git a/src/xdmcp-protocol.h b/src/xdmcp-protocol.h index b8eeda09..1c7a639b 100644 --- a/src/xdmcp-protocol.h +++ b/src/xdmcp-protocol.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -49,7 +49,7 @@ typedef struct typedef struct { XDMCPOpcode opcode; - + union { struct diff --git a/src/xdmcp-server.c b/src/xdmcp-server.c index a2d45637..4d45fb40 100644 --- a/src/xdmcp-server.c +++ b/src/xdmcp-server.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -155,7 +155,7 @@ send_packet (GSocket *socket, GSocketAddress *address, XDMCPPacket *packet) gssize n_written; g_debug ("Send %s", xdmcp_packet_tostring (packet)); - + n_written = xdmcp_packet_encode (packet, data, 1024); if (n_written < 0) g_critical ("Failed to encode XDMCP packet"); @@ -215,7 +215,7 @@ handle_query (XDMCPServer *server, GSocket *socket, GSocketAddress *address, XDM else response->Unwilling.status = g_strdup ("Server does not support authentication"); } - + send_packet (socket, address, response); xdmcp_packet_free (response); @@ -325,7 +325,7 @@ handle_request (XDMCPServer *server, GSocket *socket, GSocketAddress *address, X xdmcp_packet_free (response); return; } - + /* Must be using our authentication scheme */ if (strcmp (packet->Request.authentication_name, get_authentication_name (server)) != 0) { @@ -572,7 +572,7 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server) packet = xdmcp_packet_decode ((guint8 *)data, n_read); if (packet) - { + { g_debug ("Got %s", xdmcp_packet_tostring (packet)); switch (packet->opcode) @@ -586,7 +586,7 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server) handle_request (server, socket, address, packet); break; case XDMCP_Manage: - handle_manage (server, socket, address, packet); + handle_manage (server, socket, address, packet); break; case XDMCP_KeepAlive: handle_keep_alive (server, socket, address, packet); @@ -609,7 +609,7 @@ open_udp_socket (GSocketFamily family, guint port, GError **error) GSocket *socket; GSocketAddress *address; gboolean result; - + socket = g_socket_new (family, G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, error); if (!socket) return NULL; @@ -632,19 +632,19 @@ xdmcp_server_start (XDMCPServer *server) GError *error = NULL; g_return_val_if_fail (server != NULL, FALSE); - + server->priv->socket = open_udp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error); if (error) g_warning ("Failed to create IPv4 XDMCP socket: %s", error->message); g_clear_error (&error); - + if (server->priv->socket) { source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL); g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL); g_source_attach (source, NULL); } - + server->priv->socket6 = open_udp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error); if (error) g_warning ("Failed to create IPv6 XDMCP socket: %s", error->message); @@ -680,7 +680,7 @@ xdmcp_server_finalize (GObject *object) XDMCPServer *self; self = XDMCP_SERVER (object); - + if (self->priv->socket) g_object_unref (self->priv->socket); if (self->priv->socket6) @@ -689,8 +689,8 @@ xdmcp_server_finalize (GObject *object) g_free (self->priv->status); g_free (self->priv->key); g_hash_table_unref (self->priv->sessions); - - G_OBJECT_CLASS (xdmcp_server_parent_class)->finalize (object); + + G_OBJECT_CLASS (xdmcp_server_parent_class)->finalize (object); } static void @@ -698,7 +698,7 @@ xdmcp_server_class_init (XDMCPServerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = xdmcp_server_finalize; + object_class->finalize = xdmcp_server_finalize; g_type_class_add_private (klass, sizeof (XDMCPServerPrivate)); diff --git a/src/xdmcp-server.h b/src/xdmcp-server.h index 5c12a365..31cd0fb6 100644 --- a/src/xdmcp-server.h +++ b/src/xdmcp-server.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/src/xdmcp-session-private.h b/src/xdmcp-session-private.h index adb133f2..a40568a1 100644 --- a/src/xdmcp-session-private.h +++ b/src/xdmcp-session-private.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -28,7 +28,7 @@ struct XDMCPSessionPrivate guint inactive_timeout; XAuthority *authority; - + gboolean started; guint16 display_number; diff --git a/src/xdmcp-session.c b/src/xdmcp-session.c index da2a7081..71c5704d 100644 --- a/src/xdmcp-session.c +++ b/src/xdmcp-session.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later @@ -80,7 +80,7 @@ xdmcp_session_finalize (GObject *object) XDMCPSession *self; self = XDMCP_SESSION (object); - + g_free (self->priv->manufacturer_display_id); if (self->priv->address) g_object_unref (self->priv->address); @@ -96,7 +96,7 @@ xdmcp_session_class_init (XDMCPSessionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = xdmcp_session_finalize; + object_class->finalize = xdmcp_session_finalize; g_type_class_add_private (klass, sizeof (XDMCPSessionPrivate)); } diff --git a/src/xdmcp-session.h b/src/xdmcp-session.h index 2205fe14..63b3f367 100644 --- a/src/xdmcp-session.h +++ b/src/xdmcp-session.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Robert Ancell. * Author: Robert Ancell - * + * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later diff --git a/tests/src/X.c b/tests/src/X.c index 606fb12d..2fd722da 100644 --- a/tests/src/X.c +++ b/tests/src/X.c @@ -137,7 +137,7 @@ xdmcp_accept_cb (XDMCPClient *client, XDMCPAccept *message) static void xdmcp_decline_cb (XDMCPClient *client, XDMCPDecline *message) { - status_notify ("%s GOT-DECLINE STATUS=\"%s\" AUTHENTICATION-NAME=\"%s\"", id, message->status, message->authentication_name); + status_notify ("%s GOT-DECLINE STATUS=\"%s\" AUTHENTICATION-NAME=\"%s\"", id, message->status, message->authentication_name); } static void @@ -155,8 +155,8 @@ client_connected_cb (XServer *server, XClient *client) static void client_disconnected_cb (XServer *server, XClient *client) -{ - g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL); +{ + g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL); } static void @@ -367,7 +367,7 @@ main (int argc, char **argv) gchar *socket_path; socket_dir = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", ".X11-unix", NULL); - g_mkdir_with_parents (socket_dir, 0755); + g_mkdir_with_parents (socket_dir, 0755); socket_filename = g_strdup_printf ("X%d", display_number); socket_path = g_build_filename (socket_dir, socket_filename, NULL); @@ -415,7 +415,7 @@ main (int argc, char **argv) xdmcp_client_set_hostname (xdmcp_client, xdmcp_host); if (xdmcp_port > 0) xdmcp_client_set_port (xdmcp_client, xdmcp_port); - g_signal_connect (xdmcp_client, "query", G_CALLBACK (xdmcp_query_cb), NULL); + g_signal_connect (xdmcp_client, "query", G_CALLBACK (xdmcp_query_cb), NULL); g_signal_connect (xdmcp_client, "willing", G_CALLBACK (xdmcp_willing_cb), NULL); g_signal_connect (xdmcp_client, "accept", G_CALLBACK (xdmcp_accept_cb), NULL); g_signal_connect (xdmcp_client, "decline", G_CALLBACK (xdmcp_decline_cb), NULL); diff --git a/tests/src/Xvnc.c b/tests/src/Xvnc.c index b7e3498e..79f9193e 100644 --- a/tests/src/Xvnc.c +++ b/tests/src/Xvnc.c @@ -86,8 +86,8 @@ client_connected_cb (XServer *server, XClient *client) static void client_disconnected_cb (XServer *server, XClient *client) -{ - g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL); +{ + g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL); } static gboolean @@ -110,7 +110,7 @@ vnc_data_cb (GIOChannel *channel, GIOCondition condition, gpointer data) buffer[n_read-1] = '\0'; status_notify ("%s VNC-CLIENT-CONNECT VERSION=\"%s\"", id, buffer); } - + return TRUE; } @@ -191,7 +191,7 @@ main (int argc, char **argv) { g_free (geometry); geometry = g_strdup (argv[i+1]); - i++; + i++; } else if (strcmp (arg, "-depth") == 0) { @@ -232,7 +232,7 @@ main (int argc, char **argv) config = g_key_file_new (); g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL); - + if (use_inetd) { if (!g_io_add_watch (g_io_channel_unix_new (STDIN_FILENO), G_IO_IN, vnc_data_cb, NULL)) diff --git a/tests/src/dbus-env.c b/tests/src/dbus-env.c index c1c0075c..d99d73ae 100644 --- a/tests/src/dbus-env.c +++ b/tests/src/dbus-env.c @@ -43,7 +43,7 @@ create_bus (const gchar *config_file, GPid *pid) if (n_read > 0 && address[n_read - 1] == '\n') address[n_read - 1] = '\0'; - + return g_strdup (address); } diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index 0f1da6ac..d83a954d 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -346,7 +346,7 @@ stat (const char *path, struct stat *buf) int (*_stat) (const char *path, struct stat *buf); gchar *new_path = NULL; int ret; - + _stat = (int (*)(const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "stat"); new_path = redirect_path (path); @@ -378,7 +378,7 @@ __xstat (int version, const char *path, struct stat *buf) int (*___xstat) (int version, const char *path, struct stat *buf); gchar *new_path = NULL; int ret; - + ___xstat = (int (*)(int version, const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "__xstat"); new_path = redirect_path (path); @@ -394,7 +394,7 @@ __xstat64 (int version, const char *path, struct stat64 *buf) int (*___xstat64) (int version, const char *path, struct stat64 *buf); gchar *new_path = NULL; int ret; - + ___xstat64 = (int (*)(int version, const char *path, struct stat64 *buf)) dlsym (RTLD_NEXT, "__xstat64"); new_path = redirect_path (path); @@ -410,7 +410,7 @@ __fxstatat(int ver, int dirfd, const char *pathname, struct stat *buf, int flags int (*___fxstatat) (int ver, int dirfd, const char *pathname, struct stat *buf, int flags); gchar *new_path = NULL; int ret; - + ___fxstatat = (int (*)(int ver, int dirfd, const char *pathname, struct stat *buf, int flags)) dlsym (RTLD_NEXT, "__fxstatat"); new_path = redirect_path (pathname); @@ -426,7 +426,7 @@ __fxstatat64(int ver, int dirfd, const char *pathname, struct stat64 *buf, int f int (*___fxstatat64) (int ver, int dirfd, const char *pathname, struct stat64 *buf, int flags); gchar *new_path = NULL; int ret; - + ___fxstatat64 = (int (*)(int ver, int dirfd, const char *pathname, struct stat64 *buf, int flags)) dlsym (RTLD_NEXT, "__fxstatat64"); new_path = redirect_path (pathname); @@ -449,7 +449,7 @@ opendir (const char *name) result = _opendir (new_path); g_free (new_path); - return result; + return result; } int @@ -556,7 +556,7 @@ static void free_user (gpointer data) { struct passwd *entry = data; - + g_free (entry->pw_name); g_free (entry->pw_passwd); g_free (entry->pw_gecos); @@ -649,10 +649,10 @@ struct passwd * getpwnam (const char *name) { GList *link; - + if (name == NULL) return NULL; - + load_passwd_file (); for (link = user_entries; link; link = link->next) @@ -690,7 +690,7 @@ static void free_group (gpointer data) { struct group *entry = data; - + g_free (entry->gr_name); g_free (entry->gr_passwd); g_strfreev (entry->gr_mem); @@ -847,7 +847,7 @@ pam_authenticate (pam_handle_t *pamh, int flags) status_notify ("%s", status->str); g_string_free (status, TRUE); } - + if (strcmp (pamh->service_name, "test-remote") == 0) { int result; @@ -856,7 +856,7 @@ pam_authenticate (pam_handle_t *pamh, int flags) msg = malloc (sizeof (struct pam_message *) * 1); msg[0] = malloc (sizeof (struct pam_message)); - msg[0]->msg_style = PAM_PROMPT_ECHO_ON; + msg[0]->msg_style = PAM_PROMPT_ECHO_ON; msg[0]->msg = "remote-login:"; result = pamh->conversation.conv (1, (const struct pam_message **) msg, &resp, pamh->conversation.appdata_ptr); free (msg[0]); @@ -919,7 +919,7 @@ pam_authenticate (pam_handle_t *pamh, int flags) msg = malloc (sizeof (struct pam_message *) * 1); msg[0] = malloc (sizeof (struct pam_message)); - msg[0]->msg_style = PAM_PROMPT_ECHO_ON; + msg[0]->msg_style = PAM_PROMPT_ECHO_ON; msg[0]->msg = LOGIN_PROMPT; result = pamh->conversation.conv (1, (const struct pam_message **) msg, &resp, pamh->conversation.appdata_ptr); free (msg[0]); @@ -934,7 +934,7 @@ pam_authenticate (pam_handle_t *pamh, int flags) free (resp); return PAM_CONV_ERR; } - + pamh->user = strdup (resp[0].resp); free (resp[0].resp); free (resp); @@ -1072,7 +1072,7 @@ static const char * get_env_value (const char *name_value, const char *name) { int j; - + for (j = 0; name[j] && name_value[j] && name[j] == name_value[j]; j++); if (name[j] == '\0' && name_value[j] == '=') return &name_value[j + 1]; @@ -1167,13 +1167,13 @@ pam_get_item (const pam_handle_t *pamh, int item_type, const void **item) { if (pamh == NULL || item == NULL) return PAM_SYSTEM_ERR; - + switch (item_type) { case PAM_SERVICE: *item = pamh->service_name; return PAM_SUCCESS; - + case PAM_USER: *item = pamh->user; return PAM_SUCCESS; @@ -1185,11 +1185,11 @@ pam_get_item (const pam_handle_t *pamh, int item_type, const void **item) case PAM_RUSER: *item = pamh->ruser; return PAM_SUCCESS; - + case PAM_USER_PROMPT: *item = LOGIN_PROMPT; return PAM_SUCCESS; - + case PAM_TTY: *item = pamh->tty; return PAM_SUCCESS; @@ -1310,7 +1310,7 @@ pam_acct_mgmt (pam_handle_t *pamh, int flags) status_notify ("%s", status->str); g_string_free (status, TRUE); } - + if (!pamh->user) return PAM_USER_UNKNOWN; @@ -1666,7 +1666,7 @@ xcb_connect_to_display_with_auth_info (const char *display, xcb_auth_info_t *aut xcb_connection_t *c; gchar *socket_path; GError *error = NULL; - + c = malloc (sizeof (xcb_connection_t)); c->display = g_strdup (display); c->error = 0; diff --git a/tests/src/plymouth.c b/tests/src/plymouth.c index 1b70f304..ab9bc39d 100644 --- a/tests/src/plymouth.c +++ b/tests/src/plymouth.c @@ -38,7 +38,7 @@ main (int argc, char **argv) if (argc == 2 && strcmp (argv[1], "--has-active-vt") == 0) { if (g_key_file_get_boolean (config, "test-plymouth-config", "has-active-vt", NULL)) - { + { status_notify ("PLYMOUTH HAS-ACTIVE-VT=TRUE"); return EXIT_SUCCESS; } diff --git a/tests/src/status.c b/tests/src/status.c index 34062da4..e66e22bc 100644 --- a/tests/src/status.c +++ b/tests/src/status.c @@ -24,7 +24,7 @@ status_request_cb (GSocket *socket, GIOCondition condition, gpointer data) gchar *id, *name = NULL; gboolean id_matches; GHashTable *params; - GError *error = NULL; + GError *error = NULL; n_read = g_socket_receive (socket, (gchar *)&length, sizeof (length), NULL, &error); if (n_read > 0) diff --git a/tests/src/status.h b/tests/src/status.h index 29d19370..f22c888b 100644 --- a/tests/src/status.h +++ b/tests/src/status.h @@ -4,7 +4,7 @@ #ifdef __cplusplus extern "C" { #endif - + #include typedef void (*StatusRequestFunc)(const gchar *name, GHashTable *params); diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index 1aec727d..dc12d475 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -531,7 +531,7 @@ handle_command (const gchar *command) const gchar *id, *v; Login1Seat *seat; - id = g_hash_table_lookup (params, "ID"); + id = g_hash_table_lookup (params, "ID"); seat = add_login1_seat (g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL), id, TRUE); v = g_hash_table_lookup (params, "CAN-GRAPHICAL"); if (v) @@ -544,7 +544,7 @@ handle_command (const gchar *command) { Login1Seat *seat; const gchar *id; - + id = g_hash_table_lookup (params, "ID"); seat = find_login1_seat (id); if (seat) @@ -1330,7 +1330,7 @@ handle_ck_session_call (GDBusConnection *connection, CKSession *session = user_data; if (strcmp (method_name, "Lock") == 0) - { + { if (!session->locked) check_status ("CONSOLE-KIT LOCK-SESSION"); session->locked = TRUE; @@ -1585,7 +1585,7 @@ remove_login1_seat (GDBusConnection *connection, const gchar *id) if (error) g_warning ("Failed to emit SeatNew: %s", error->message); g_clear_error (&error); - + login1_seats = g_list_remove (login1_seats, seat); g_free (seat->id); g_free (seat->path); @@ -1930,7 +1930,7 @@ get_accounts_user_by_uid (guint uid) if (u->uid == uid) return u; } - + return NULL; } @@ -2491,7 +2491,7 @@ main (int argc, char **argv) if (!g_file_test (temp_dir, G_FILE_TEST_EXISTS)) break; i++; - } + } g_mkdir_with_parents (temp_dir, 0755); g_setenv ("LIGHTDM_TEST_ROOT", temp_dir, TRUE); diff --git a/tests/src/test-script-hook.c b/tests/src/test-script-hook.c index 7ce8a0cd..e0d72084 100644 --- a/tests/src/test-script-hook.c +++ b/tests/src/test-script-hook.c @@ -19,7 +19,7 @@ main (int argc, char **argv) config = g_key_file_new (); g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL); - + if (argc < 2) { g_printerr ("Usage: %s text [return-value]\n", argv[0]); diff --git a/tests/src/test-session.c b/tests/src/test-session.c index 0fbb5b1a..24cc2862 100644 --- a/tests/src/test-session.c +++ b/tests/src/test-session.c @@ -48,7 +48,7 @@ request_cb (const gchar *name, GHashTable *params) g_main_loop_quit (loop); return; } - + if (strcmp (name, "LOGOUT") == 0) exit (EXIT_SUCCESS); @@ -180,7 +180,7 @@ request_cb (const gchar *name, GHashTable *params) { const gchar *data = g_hash_table_lookup (params, "DATA"); gchar *dir; - + dir = getenv ("XDG_GREETER_DATA_DIR"); if (dir) { diff --git a/tests/src/unity-system-compositor.c b/tests/src/unity-system-compositor.c index ab6ea114..f14cdf9c 100644 --- a/tests/src/unity-system-compositor.c +++ b/tests/src/unity-system-compositor.c @@ -93,7 +93,7 @@ read_message_cb (GIOChannel *channel, GIOCondition condition, gpointer data) if (n_read != payload_length) { g_printerr ("Short read for payload, %zi instead of expected %d\n", n_read, payload_length); - return FALSE; + return FALSE; } switch (id) diff --git a/tests/src/vnc-client.c b/tests/src/vnc-client.c index a8a4b591..b1917049 100644 --- a/tests/src/vnc-client.c +++ b/tests/src/vnc-client.c @@ -33,7 +33,7 @@ main (int argc, char **argv) config = g_key_file_new (); g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL); - + if (argc > 1) server_address = g_strdup (argv[1]); else @@ -70,7 +70,7 @@ main (int argc, char **argv) address = g_network_address_new (hostname, port); enumerator = g_socket_connectable_enumerate (address); result = FALSE; - while (TRUE) + while (TRUE) { GSocketAddress *socket_address; GError *e = NULL; diff --git a/tests/src/x-authority.c b/tests/src/x-authority.c index 5f692fe0..6344b4a2 100644 --- a/tests/src/x-authority.c +++ b/tests/src/x-authority.c @@ -68,10 +68,10 @@ x_authority_match_local (XAuthority *authority, const gchar *authorization_name) for (link = authority->priv->records; link; link = link->next) { XAuthorityRecord *record = link->data; - + if (strcmp (record->priv->authorization_name, authorization_name) != 0) continue; - + if (record->priv->family == XAUTH_FAMILY_WILD || record->priv->family == XAUTH_FAMILY_LOCAL) return record; } @@ -87,10 +87,10 @@ x_authority_match_localhost (XAuthority *authority, const gchar *authorization_n for (link = authority->priv->records; link; link = link->next) { XAuthorityRecord *record = link->data; - + if (strcmp (record->priv->authorization_name, authorization_name) != 0) continue; - + if (record->priv->family == XAUTH_FAMILY_WILD || record->priv->family == XAUTH_FAMILY_LOCALHOST) return record; } @@ -193,7 +193,7 @@ x_authority_record_check_cookie (XAuthorityRecord *record, const guint8 *cookie_ if (strcmp (record->priv->authorization_name, "MIT-MAGIC-COOKIE-1") != 0) return FALSE; - + if (cookie_data_length != record->priv->authorization_data_length) return FALSE; diff --git a/tests/src/x-server.c b/tests/src/x-server.c index a9ae7f2f..ab604fdf 100644 --- a/tests/src/x-server.c +++ b/tests/src/x-server.c @@ -37,7 +37,7 @@ struct XServerPrivate struct XClientPrivate { XServer *server; - GSocket *socket; + GSocket *socket; GIOChannel *channel; }; @@ -52,7 +52,7 @@ void x_client_send_failed (XClient *client, const gchar *reason) { gchar *message; - + message = g_strdup_printf ("FAILED:%s", reason); errno = 0; if (send (g_io_channel_unix_get_fd (client->priv->channel), message, strlen (message), 0) != strlen (message)) @@ -60,7 +60,7 @@ x_client_send_failed (XClient *client, const gchar *reason) g_free (message); } -void +void x_client_send_success (XClient *client) { gchar *message; diff --git a/tests/src/xdmcp-client.c b/tests/src/xdmcp-client.c index 4308da87..63c5dba1 100644 --- a/tests/src/xdmcp-client.c +++ b/tests/src/xdmcp-client.c @@ -43,7 +43,7 @@ struct XDMCPClientPrivate }; enum { - XDMCP_CLIENT_QUERY, + XDMCP_CLIENT_QUERY, XDMCP_CLIENT_WILLING, XDMCP_CLIENT_ACCEPT, XDMCP_CLIENT_DECLINE, @@ -82,7 +82,7 @@ decode_willing (XDMCPClient *client, const guint8 *buffer, gssize buffer_length) /* Stop sending queries */ g_source_remove (client->priv->query_timer); client->priv->query_timer = 0; - + message = g_malloc0 (sizeof (XDMCPWilling)); length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset); @@ -93,7 +93,7 @@ decode_willing (XDMCPClient *client, const guint8 *buffer, gssize buffer_length) message->status = read_string (buffer, buffer_length, length, &offset); g_signal_emit (client, xdmcp_client_signals[XDMCP_CLIENT_WILLING], 0, message); - + g_free (message->authentication_name); g_free (message->hostname); g_free (message->status); @@ -133,7 +133,7 @@ decode_decline (XDMCPClient *client, const guint8 *buffer, gssize buffer_length) XDMCPDecline *message; gsize offset = 0; guint16 length; - + message = g_malloc0 (sizeof (XDMCPDecline)); length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset); @@ -142,7 +142,7 @@ decode_decline (XDMCPClient *client, const guint8 *buffer, gssize buffer_length) message->authentication_name = read_string (buffer, buffer_length, length, &offset); length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset); read_string8 (buffer, buffer_length, length, &offset); - + g_signal_emit (client, xdmcp_client_signals[XDMCP_CLIENT_DECLINE], 0, message); g_free (message->status); @@ -275,7 +275,7 @@ xdmcp_client_start (XDMCPClient *client) address = g_network_address_new (client->priv->host, client->priv->port); enumerator = g_socket_connectable_enumerate (address); result = FALSE; - while (TRUE) + while (TRUE) { GSocketAddress *socket_address; GError *e = NULL; @@ -299,11 +299,11 @@ xdmcp_client_start (XDMCPClient *client) g_warning ("Unable to connect XDMCP socket: %s", error->message); if (!result) return FALSE; - + g_io_add_watch (g_io_channel_unix_new (g_socket_get_fd (client->priv->socket)), G_IO_IN, xdmcp_data_cb, client); client->priv->query_timer = g_timeout_add (2000, xdmcp_query_cb, client); - xdmcp_query_cb (client); + xdmcp_query_cb (client); return TRUE; } @@ -312,7 +312,7 @@ GInetAddress * xdmcp_client_get_local_address (XDMCPClient *client) { GSocketAddress *socket_address; - + if (!client->priv->socket) return NULL; @@ -338,7 +338,7 @@ xdmcp_client_send_query (XDMCPClient *client) write_card16 (buffer, MAXIMUM_REQUEST_LENGTH, X_BYTE_ORDER_MSB, 1, &offset); write_card8 (buffer, MAXIMUM_REQUEST_LENGTH, 0, &offset); - xdmcp_write (client, buffer, offset); + xdmcp_write (client, buffer, offset); } void @@ -417,7 +417,7 @@ xdmcp_client_send_manage (XDMCPClient *client, guint32 session_id, guint16 displ write_card16 (buffer, MAXIMUM_REQUEST_LENGTH, X_BYTE_ORDER_MSB, strlen (display_class), &offset); write_string (buffer, MAXIMUM_REQUEST_LENGTH, display_class, &offset); - xdmcp_write (client, buffer, offset); + xdmcp_write (client, buffer, offset); } static void -- 2.39.2