From c34dcf184ef4eaa35634d1696e0c68d21b811170 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Oct 2012 13:12:26 +0000 Subject: fish: inspect: Move variable decls to top of function. This is just code motion. --- fish/inspect.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fish/inspect.c b/fish/inspect.c index b71c4d72..3f611117 100644 --- a/fish/inspect.c +++ b/fish/inspect.c @@ -178,12 +178,16 @@ inspect_mount_root (const char *root) void print_inspect_prompt (void) { - char *name = guestfs_inspect_get_product_name (g, root); + size_t i; + char *name; + char **mountpoints; + + name = guestfs_inspect_get_product_name (g, root); if (name && STRNEQ (name, "unknown")) printf (_("Operating system: %s\n"), name); free (name); - char **mountpoints = guestfs_inspect_get_mountpoints (g, root); + mountpoints = guestfs_inspect_get_mountpoints (g, root); if (mountpoints == NULL) return; @@ -191,7 +195,6 @@ print_inspect_prompt (void) qsort (mountpoints, count_strings (mountpoints) / 2, 2 * sizeof (char *), compare_keys); - size_t i; for (i = 0; mountpoints[i] != NULL; i += 2) printf (_("%s mounted on %s\n"), mountpoints[i+1], mountpoints[i]); -- cgit