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@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list