On 09/14/2016 03:05 AM, Ashijeet Acharya wrote:

>>> +    if (params->has_max_bandwidth &&
>>> +        (params->max_bandwidth < 0 || params->max_bandwidth > SIZE_MAX)) {
>>> +        error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
>>> +                   "max_bandwidth",
>>> +                   "an integer in the range of 0 to SIZE_MAX");
>>
>> Might be nicer to give a numeric value instead of assuming the reader
>> knows what value SIZE_MAX has, but not the end of the world.
> 
> I used SIZE_MAX because substituting it with its value looked a bit messy.
> Should I use its actual value?

as in ("...%zu", ..., SIZE_MAX), since not all platforms have the same
value of SIZE_MAX.  I'm okay if you don't bother, but if you do, see if
any other code does similar, and copy how they do it (I seem to recall
past complaints about a cast being needed because at least one system
has a broken header that defines SIZE_MAX with the wrong type).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to