[gdm] display: drop error arg from gdm_display_get_timed_login_details
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] display: drop error arg from gdm_display_get_timed_login_details
- Date: Wed, 18 Feb 2015 22:43:10 +0000 (UTC)
commit 859ed525623a710fe0a58b59fd5808bcfcaf31e8
Author: Ray Strode <rstrode redhat com>
Date: Tue Feb 10 23:26:46 2015 -0500
display: drop error arg from gdm_display_get_timed_login_details
It turns out it never fails, and all callers always pass NULL for
it's error argument, so drop that argument and the gboolean return
type.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
daemon/gdm-display.c | 11 +++--------
daemon/gdm-display.h | 5 ++---
daemon/gdm-manager.c | 8 ++++----
3 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 0ad521f..db83dfc 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -329,19 +329,16 @@ gdm_display_real_get_timed_login_details (GdmDisplay *display,
}
}
-gboolean
+void
gdm_display_get_timed_login_details (GdmDisplay *display,
gboolean *out_enabled,
char **out_username,
- int *out_delay,
- GError **error)
+ int *out_delay)
{
gboolean enabled;
char *username;
int delay;
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-
GDM_DISPLAY_GET_CLASS (display)->get_timed_login_details (display, &enabled, &username, &delay);
g_debug ("GdmDisplay: Got timed login details for display %s: %d '%s' %d",
@@ -363,8 +360,6 @@ gdm_display_get_timed_login_details (GdmDisplay *display,
if (out_delay) {
*out_delay = delay;
}
-
- return TRUE;
}
gboolean
@@ -925,7 +920,7 @@ handle_get_timed_login_details (GdmDBusDisplay *skeleton,
char *username;
int delay;
- gdm_display_get_timed_login_details (display, &enabled, &username, &delay, NULL);
+ gdm_display_get_timed_login_details (display, &enabled, &username, &delay);
gdm_dbus_display_complete_get_timed_login_details (skeleton,
invocation,
diff --git a/daemon/gdm-display.h b/daemon/gdm-display.h
index 0301814..8242b0f 100644
--- a/daemon/gdm-display.h
+++ b/daemon/gdm-display.h
@@ -117,11 +117,10 @@ gboolean gdm_display_get_seat_id (GdmDisplay *disp
gboolean gdm_display_is_local (GdmDisplay *display,
gboolean *local,
GError **error);
-gboolean gdm_display_get_timed_login_details (GdmDisplay *display,
+void gdm_display_get_timed_login_details (GdmDisplay *display,
gboolean *enabled,
char **username,
- int *delay,
- GError **error);
+ int *delay);
gboolean gdm_display_is_initial (GdmDisplay *display,
gboolean *initial,
GError **error);
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index a4e1839..e564545 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1324,7 +1324,7 @@ display_should_autologin (GdmManager *manager,
return FALSE;
}
- gdm_display_get_timed_login_details (display, &enabled, NULL, &delay, NULL);
+ gdm_display_get_timed_login_details (display, &enabled, NULL, &delay);
return enabled && delay == 0;
}
@@ -1756,7 +1756,7 @@ on_session_client_connected (GdmSession *session,
g_object_get (display, "is-local", &display_is_local, NULL);
enabled = FALSE;
- gdm_display_get_timed_login_details (display, &enabled, &username, &delay, NULL);
+ gdm_display_get_timed_login_details (display, &enabled, &username, &delay);
if (! enabled) {
return;
@@ -1876,7 +1876,7 @@ on_session_conversation_started (GdmSession *session,
}
enabled = FALSE;
- gdm_display_get_timed_login_details (display, &enabled, &username, &delay, NULL);
+ gdm_display_get_timed_login_details (display, &enabled, &username, &delay);
if (! enabled) {
return;
}
@@ -1932,7 +1932,7 @@ start_autologin_conversation_if_necessary (GdmManager *manager,
gboolean enabled;
int delay = 0;
- gdm_display_get_timed_login_details (display, &enabled, NULL, &delay, NULL);
+ gdm_display_get_timed_login_details (display, &enabled, NULL, &delay);
if (delay == 0 && g_file_test (GDM_RAN_ONCE_MARKER_FILE, G_FILE_TEST_EXISTS)) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]