mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
df: Move variable decl to top of function.
Since this code is no longer conditional, we don't need to have the
extra { ... } inside the case statement.
This tidies up commit 2f0a4d7c18.
This commit is contained in:
@@ -317,6 +317,7 @@ static char *
|
||||
single_drive_display_name (struct drv *drvs)
|
||||
{
|
||||
char *name = NULL;
|
||||
char *p;
|
||||
|
||||
assert (drvs != NULL);
|
||||
assert (drvs->next == NULL);
|
||||
@@ -334,9 +335,8 @@ single_drive_display_name (struct drv *drvs)
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case drv_uri: {
|
||||
char *p;
|
||||
|
||||
case drv_uri:
|
||||
name = (char *) xmlSaveUri (drvs->uri.uri);
|
||||
if (name == NULL) {
|
||||
fprintf (stderr, _("%s: xmlSaveUri: could not make printable URI\n"),
|
||||
@@ -357,7 +357,7 @@ single_drive_display_name (struct drv *drvs)
|
||||
name = p;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case drv_d:
|
||||
name = strdup (drvs->d.guest);
|
||||
if (name == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user