On 05/28/2012 07:34 AM, Daniel P. Berrange wrote: > On Fri, May 25, 2012 at 05:35:20PM -0600, Eric Blake wrote: >> On 05/25/2012 11:44 AM, Daniel P. Berrange wrote: >>> From: "Daniel P. Berrange" <[email protected]> >>> >>> To ensure consistent error reporting of invalid arguments, >>> provide a number of predefined helper methods & macros. >>> >>> - An arg which must not be NULL: >>> >>> virCheckNonNullArgReturn(argname, retvalue) >>> virCheckNonNullArgGoto(argname, label) >> >> ... Looks useful. I'll review the macros first. > > [snip] > >> ACK with problems fixed. If you post a v2, post an interdiff (I don't >> want to scroll through the whole thing again :) > > Here is what I propose to amend before pushing
> +++ b/src/libvirt.c
> @@ -4918,16 +4918,16 @@ virDomainMigratePeer2Peer (virDomainPtr domain,
> }
>
> if (!tempuri->server) {
> - virReportInvalidArg(tempuri,
> - _("server field in tempuri in %s must not be
> NULL"),
> + virReportInvalidArg(dconnuri,
> + _("unable to parser server from dconnuri in %s"),
s/parser/parse/
> __FUNCTION__);
> virDispatchError(domain->conn);
> virURIFree(tempuri);
> return -1;
> }
> if (STRPREFIX(tempuri->server, "localhost")) {
> - virReportInvalidArg(tempuri,
> - _("server field in tempuri in %s must not be
> 'localhost'"),
> + virReportInvalidArg(dconnuri,
> + _("unable to parser server from dconnuri in %s"),
and again.
ACK with those changes.
--
Eric Blake [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
