mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virStorageBackendZFSRefreshPool: Reduce scope of 'tokens'
Declare it in the loop that actually uses it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f443574193
commit
01f7251457
@ -216,7 +216,6 @@ virStorageBackendZFSRefreshPool(virStoragePoolObjPtr pool G_GNUC_UNUSED)
|
||||
size_t i;
|
||||
g_autoptr(virCommand) cmd = NULL;
|
||||
g_auto(GStrv) lines = NULL;
|
||||
g_auto(GStrv) tokens = NULL;
|
||||
g_autofree char *name = g_strdup(def->source.name);
|
||||
char *tmp;
|
||||
|
||||
@ -246,13 +245,13 @@ virStorageBackendZFSRefreshPool(virStoragePoolObjPtr pool G_GNUC_UNUSED)
|
||||
goto cleanup;
|
||||
|
||||
for (i = 0; lines[i]; i++) {
|
||||
g_auto(GStrv) tokens = NULL;
|
||||
size_t count;
|
||||
char *prop_name;
|
||||
|
||||
if (STREQ(lines[i], ""))
|
||||
continue;
|
||||
|
||||
g_strfreev(tokens);
|
||||
if (!(tokens = virStringSplitCount(lines[i], "\t", 0, &count)))
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user