[libvirt] [PATCH 03/14] util: storagefile: Simplify cleanup handling in virStorageSourceParseBackingURI

Ján Tomko jtomko at redhat.com
Wed Aug 21 15:04:09 UTC 2019


On Fri, Aug 16, 2019 at 12:39:24PM +0200, Peter Krempa wrote:
>Automatically clean the 'uri' variable and get rid of the 'cleanup'
>label.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/util/virstoragefile.c | 31 +++++++++++++------------------
> 1 file changed, 13 insertions(+), 18 deletions(-)
>
>diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
>index 8af45bfbd2..e93f6285b0 100644
>--- a/src/util/virstoragefile.c
>+++ b/src/util/virstoragefile.c
>@@ -2664,32 +2664,31 @@ static int
> virStorageSourceParseBackingURI(virStorageSourcePtr src,
>                                 const char *uristr)
> {
>-    virURIPtr uri = NULL;
>+    VIR_AUTOPTR(virURI)uri = NULL;

Space between the closing parenthesis and the variable name, please.

>     const char *path = NULL;
>-    int ret = -1;
>     VIR_AUTOSTRINGLIST scheme = NULL;

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190821/58135baa/attachment-0001.sig>


More information about the libvir-list mailing list