From: Eric Blake <eblake@redhat.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: lcapitulino@redhat.com, quintela@redhat.com,
amit.shah@redhat.com, armbru@redhat.com,
"dgilbert@redhat.com" <dgilbert@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>
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 [thread overview]
Message-ID: <30517604-e6a5-ea1d-7672-3dc5250e4ded@redhat.com> (raw)
In-Reply-To: <CAC2QTZa37gG=A5H1yFRjp1OF0ajRLRBCbrBqoog6c4LQdP1oVQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-09-14 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 19:02 [Qemu-devel] [PATCH v5] migrate: Move max-bandwidth and downtime-limit to migrate_set_parameter Ashijeet Acharya
2016-09-13 19:22 ` Eric Blake
2016-09-14 8:05 ` Ashijeet Acharya
2016-09-14 13:58 ` Eric Blake [this message]
2016-09-14 14:33 ` Ashijeet Acharya
2016-09-14 14:58 ` Ashijeet Acharya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30517604-e6a5-ea1d-7672-3dc5250e4ded@redhat.com \
--to=eblake@redhat.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=ashijeetacharya@gmail.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).