On Tue, Jul 09, 2019 at 12:46:30 -0500, Eric Blake wrote: > Even though we don't accept any flags, it is unfriendly to callers > that use the modern API to have to fall back to the flag-free API. > > Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> > --- > src/vbox/vbox_common.c | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > > diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c > index 54e31bec9d..44c98cadf6 100644 > --- a/src/vbox/vbox_common.c > +++ b/src/vbox/vbox_common.c > @@ -553,7 +553,8 @@ static int vboxConnectClose(virConnectPtr conn) > } > > static int > -vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) > +vboxDomainSaveFlags(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED, > + const char *dxml, unsigned int flags) > { > vboxDriverPtr data = dom->conn->privateData; > IConsole *console = NULL; > @@ -564,6 +565,9 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) > nsresult rc; > int ret = -1; > > + virCheckFlags(0, -1); > + virCheckNonNullArgReturn(dxml, -1); This reports: invalid argument: dxml in vboxDomainSave must not be NULL I'm not certain that the internal function name makes sense to external users. > + > if (!data->vboxObj) > return ret; > > @@ -607,6 +611,12 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) > return ret; > } > > +static int > +vboxDomainSave(virDomainPtr dom, const char *path) > +{ > + return vboxDomainSaveFlags(dom, path, NULL, 0); So, this passes NULL 'dxml' into vboxDomainSaveFlags which explicitly rejects it. What's the point? Ah I see. Was the above supposed to be virCheckNullArgGoto?
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list