mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: inspect: Move variable decls to top of function.
This is just code motion.
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user