Re: [PATCH 05/21] qemu: qapi: Return schema entry via argument in virQEMUQAPISchemaTraverse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 25, 2019 at 13:46:14 +0200, Ján Tomko wrote:
> On Mon, Apr 15, 2019 at 06:01:58PM +0200, Peter Krempa wrote:
> > To allow for boolean query string, let's return the queried schema entry
> > via argument rather than a return value.
> > 
> > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> > ---
> > src/qemu/qemu_qapi.c | 30 +++++++++++++++++-------------
> > 1 file changed, 17 insertions(+), 13 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c
> > index de663d4408..7155f2d084 100644
> > --- a/src/qemu/qemu_qapi.c
> > +++ b/src/qemu/qemu_qapi.c
> > @@ -101,10 +101,11 @@ virQEMUQAPISchemaObjectGetType(const char *field,
> > }
> > 
> > 
> > -static virJSONValuePtr
> > +static int
> > virQEMUQAPISchemaTraverse(const char *baseName,
> >                           char **query,
> > -                          virHashTablePtr schema)
> > +                          virHashTablePtr schema,
> > +                          virJSONValuePtr *type)
> > {
> >     virJSONValuePtr base;
> >     virJSONValuePtr obj;
> > @@ -114,18 +115,20 @@ virQEMUQAPISchemaTraverse(const char *baseName,
> > 
> 
> Adding
> 
>    *type = NULL;
> 
> here would make sure we consistently set the return value.

The caller does that.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux