]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: remove extraneous call to VIR_DIR_CLOSE()
authorLaine Stump <laine@redhat.com>
Mon, 26 Oct 2020 02:28:09 +0000 (22:28 -0400)
committerLaine Stump <laine@redhat.com>
Tue, 3 Nov 2020 03:01:36 +0000 (22:01 -0500)
VIR_DIR_CLOSE(dir) is called in the middle of
virStorageBackendRefreshLocal(), which is okay, but redundant - there
is no reference to dir between that call and the end of the function,
where VIR_DIR_CLOSE() is called again. Remove the extra call in the
middle to simplify the function and make the conversion to g_autoptr
trivial/mechanical.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/storage/storage_util.c

index 21ad54ac547a17a0170f700a70e8599b25c967d5..7eaf8998831cfb8006f16aa75087f60ac6da0bbb 100644 (file)
@@ -3553,7 +3553,6 @@ virStorageBackendRefreshLocal(virStoragePoolObjPtr pool)
     }
     if (direrr < 0)
         goto cleanup;
-    VIR_DIR_CLOSE(dir);
 
     target = virStorageSourceNew();