From e19572fc77c5b80144bdbbcf9040b5a66eb4fa37 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 19 Jun 2012 12:23:58 -0500 Subject: action_func_spawn_async() doesn't need a varargs argument anymore. --- src/session-menu-mgr.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index d676337..ccc27de 100644 --- a/src/session-menu-mgr.c +++ b/src/session-menu-mgr.c @@ -131,7 +131,7 @@ static void action_func_switch_to_lockscreen (SessionMenuMgr *); static void action_func_switch_to_greeter (SessionMenuMgr *); static void action_func_switch_to_guest (SessionMenuMgr *); static void action_func_switch_to_user (AccountsUser *); -static void action_func_spawn_async (const char * fmt, ...); +static void action_func_spawn_async (const char * cmd); static gboolean is_this_guest_session (void); static gboolean is_this_live_session (void); @@ -952,22 +952,17 @@ update_user_menuitems (SessionMenuMgr * mgr) ***/ static void -action_func_spawn_async (const char * fmt, ...) +action_func_spawn_async (const char * cmd) { - va_list marker; - va_start (marker, fmt); - gchar * cmd = g_strdup_vprintf (fmt, marker); - va_end (marker); - GError * error = NULL; + g_spawn_command_line_async (cmd, &error); + if (error != NULL) { g_warning ("Unable to execute \"%s\": %s", cmd, error->message); g_clear_error (&error); } - - g_free (cmd); } /* Calling "Lock" locks the screen & goes to black. -- cgit v1.2.3