[libvirt] [PATCH] tools: Tiny clean-ups for two functions in virsh-completer.c

Ján Tomko jtomko at redhat.com
Mon May 21 13:01:44 UTC 2018


On Mon, May 21, 2018 at 02:47:41PM +0200, Martin Kletzander wrote:
>These two functions were duplicating some cleanup paths, so let's just merge
>both cleanup and error paths together.  To distinguish whether we need to
>clean-up the return value let's keep it in @tmp until the function is successful
>in which case we set @ret to the value of @tmp and set @tmp to NULL.
>
>Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>---
> tools/virsh-completer.c | 48 ++++++++++++++++++-----------------------
> 1 file changed, 21 insertions(+), 27 deletions(-)
>

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: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180521/cf5b6480/attachment-0001.sig>


More information about the libvir-list mailing list