Re: [PATCH v4 02/13] Adding virDomainSetMemoryParameters and virDomainGetMemoryParameters API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]