Re: [libvirt] [PATCH] Santize the reporting of VIR_ERR_INVALID_ERROR

2012-05-28 Thread Eric Blake
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" >>> >>> To ensure consistent error reporting of invalid arguments, >>> provide a number of predefined

Re: [libvirt] [PATCH] Santize the reporting of VIR_ERR_INVALID_ERROR

2012-05-28 Thread Daniel P. Berrange
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" > > > > To ensure consistent error reporting of invalid arguments, > > provide a number of predefined helper methods & macros. > > > > - An arg which mu

Re: [libvirt] [PATCH] Santize the reporting of VIR_ERR_INVALID_ERROR

2012-05-28 Thread Daniel P. Berrange
On Fri, May 25, 2012 at 05:35:20PM -0600, Eric Blake wrote: > > +# define virReportInvalidNullArg(argname)\ > > +virRaiseErrorFull(__FILE__, __FUNCTION__, __LINE__, \ > > + VIR_FROM_THIS, \ > > +

Re: [libvirt] [PATCH] Santize the reporting of VIR_ERR_INVALID_ERROR

2012-05-25 Thread Eric Blake
On 05/25/2012 11:44 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > 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) >v