
12 Oct
2010
12 Oct
'10
4:16 p.m.
On 10/12/2010 08:01 AM, Daniel Veillard wrote:
Seems that params<= 0 or a NULL params are errors in this function based on the API description, so I prefer to catch those here and added
if ((nparams<= 0) || (params == NULL)) { virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__); goto error; }
Or even one step further, and use annotations to mark the function arguments as ATTRIBUTE_NONNULL to get compiler checking of your logic. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org