summaryrefslogtreecommitdiff
path: root/src/plymouth.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2018-01-12 11:10:07 +1300
committerRobert Ancell <robert.ancell@canonical.com>2018-01-12 16:11:44 +1300
commita95eded633eaff672e2a5b3bee7483a6a050c7e4 (patch)
tree8ff2a4de86ea36a942284d5ade9c87cfeab60125 /src/plymouth.c
parent6b08e3cf1c54d1943a4ccaab139e959eb7b04092 (diff)
downloadlightdm-git-a95eded633eaff672e2a5b3bee7483a6a050c7e4.tar.gz
Move variable declarations from the start of function blocks.
It's well past 1999...
Diffstat (limited to 'src/plymouth.c')
-rw-r--r--src/plymouth.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plymouth.c b/src/plymouth.c
index ec9377c8..d1ed91f4 100644
--- a/src/plymouth.c
+++ b/src/plymouth.c
@@ -24,12 +24,9 @@ static gboolean has_active_vt = FALSE;
static gboolean
plymouth_run_command (const gchar *command, gint *exit_status)
{
- g_autofree gchar *command_line = NULL;
- gboolean result;
+ g_autofree gchar *command_line = g_strdup_printf ("plymouth %s", command);
g_autoptr(GError) error = NULL;
-
- command_line = g_strdup_printf ("plymouth %s", command);
- result = g_spawn_command_line_sync (command_line, NULL, NULL, exit_status, &error);
+ gboolean result = g_spawn_command_line_sync (command_line, NULL, NULL, exit_status, &error);
if (error)
g_debug ("Could not run %s: %s", command_line, error->message);