diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/cancel.c | 2 | ||||
-rw-r--r-- | src/polkitagent/polkitagenthelperprivate.c | 2 | ||||
-rw-r--r-- | src/polkitagent/polkitagentlistener.c | 6 | ||||
-rw-r--r-- | src/polkitbackend/polkitd.c | 2 | ||||
-rw-r--r-- | src/programs/pkaction.c | 2 | ||||
-rw-r--r-- | src/programs/pkcheck.c | 2 | ||||
-rw-r--r-- | src/programs/pkexec.c | 5 | ||||
-rw-r--r-- | src/programs/pkttyagent.c | 2 |
8 files changed, 2 insertions, 21 deletions
diff --git a/src/examples/cancel.c b/src/examples/cancel.c index 1470025..02a8b63 100644 --- a/src/examples/cancel.c +++ b/src/examples/cancel.c @@ -102,8 +102,6 @@ main (int argc, char *argv[]) PolkitAuthority *authority; GCancellable *cancellable; - g_type_init (); - if (argc != 2) { g_printerr ("usage: %s <action_id>\n", argv[0]); diff --git a/src/polkitagent/polkitagenthelperprivate.c b/src/polkitagent/polkitagenthelperprivate.c index e23f9f5..1f32c0a 100644 --- a/src/polkitagent/polkitagenthelperprivate.c +++ b/src/polkitagent/polkitagenthelperprivate.c @@ -88,8 +88,6 @@ send_dbus_message (const char *cookie, const char *user) ret = FALSE; - g_type_init (); - error = NULL; authority = polkit_authority_get_sync (NULL /* GCancellable* */, &error); if (authority == NULL) diff --git a/src/polkitagent/polkitagentlistener.c b/src/polkitagent/polkitagentlistener.c index 4704b03..1431458 100644 --- a/src/polkitagent/polkitagentlistener.c +++ b/src/polkitagent/polkitagentlistener.c @@ -422,10 +422,8 @@ polkit_agent_listener_register_with_options (PolkitAgentListener *listener, if (flags & POLKIT_AGENT_REGISTER_FLAGS_RUN_IN_THREAD) { - server->thread = g_thread_create (server_thread_func, - server, - TRUE, - error); + server->thread = g_thread_try_new ("polkit agent listener", + server_thread_func, server, error); if (server->thread == NULL) { server_free (server); diff --git a/src/polkitbackend/polkitd.c b/src/polkitbackend/polkitd.c index 42397e1..6c57151 100644 --- a/src/polkitbackend/polkitd.c +++ b/src/polkitbackend/polkitd.c @@ -173,8 +173,6 @@ main (int argc, /* Disable remote file access from GIO. */ setenv ("GIO_USE_VFS", "local", 1); - g_type_init (); - opt_context = g_option_context_new ("polkit system daemon"); g_option_context_add_main_entries (opt_context, opt_entries, NULL); error = NULL; diff --git a/src/programs/pkaction.c b/src/programs/pkaction.c index 221662a..6dd6877 100644 --- a/src/programs/pkaction.c +++ b/src/programs/pkaction.c @@ -125,8 +125,6 @@ main (int argc, char *argv[]) /* Disable remote file access from GIO. */ setenv ("GIO_USE_VFS", "local", 1); - g_type_init (); - opt_show_version = FALSE; opt_verbose = FALSE; diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c index 33db128..f1bb4e1 100644 --- a/src/programs/pkcheck.c +++ b/src/programs/pkcheck.c @@ -366,8 +366,6 @@ main (int argc, char *argv[]) /* Disable remote file access from GIO. */ setenv ("GIO_USE_VFS", "local", 1); - g_type_init (); - details = polkit_details_new (); opt_show_help = FALSE; diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c index 3b29b24..32c204d 100644 --- a/src/programs/pkexec.c +++ b/src/programs/pkexec.c @@ -707,11 +707,6 @@ main (int argc, char *argv[]) goto out; } - /* Initialize the GLib type system - this is needed to interact with the - * PolicyKit daemon - */ - g_type_init (); - /* make sure we are nuked if the parent process dies */ #ifdef __linux__ if (prctl (PR_SET_PDEATHSIG, SIGTERM) != 0) diff --git a/src/programs/pkttyagent.c b/src/programs/pkttyagent.c index 533f4a8..bfe00bd 100644 --- a/src/programs/pkttyagent.c +++ b/src/programs/pkttyagent.c @@ -78,8 +78,6 @@ main (int argc, char *argv[]) /* Disable remote file access from GIO. */ setenv ("GIO_USE_VFS", "local", 1); - g_type_init (); - error = NULL; context = g_option_context_new (""); s = g_strdup_printf (_("Report bugs to: %s\n" |