qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5] migrate: Move max-bandwidth and downtime-lim


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5] migrate: Move max-bandwidth and downtime-limit to migrate_set_parameter
Date: Wed, 14 Sep 2016 08:58:55 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

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

[Prev in Thread] Current Thread [Next in Thread]