From: Laine Stump Date: Mon, 26 Oct 2020 02:28:09 +0000 (-0400) Subject: storage: remove extraneous call to VIR_DIR_CLOSE() X-Git-Tag: v6.10.0-rc1~396 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21f659d952c687aaab08bb62c8d253157b4e1d8e;p=thirdparty%2Flibvirt.git storage: remove extraneous call to VIR_DIR_CLOSE() 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 Reviewed-by: Daniel Henrique Barboza --- diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 21ad54ac54..7eaf899883 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -3553,7 +3553,6 @@ virStorageBackendRefreshLocal(virStoragePoolObjPtr pool) } if (direrr < 0) goto cleanup; - VIR_DIR_CLOSE(dir); target = virStorageSourceNew();