qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v7 4/4] utils: remove assert in size_to_str()
Date: Thu, 11 May 2017 10:03:20 -0500	[thread overview]
Message-ID: <d938d532-6d11-0ec5-a24a-0a44519bc021@redhat.com> (raw)
In-Reply-To: <1494505358-15287-5-git-send-email-peterx@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

On 05/11/2017 07:22 AM, Peter Xu wrote:
> It's not very safe to assert in size_to_str(). Let's be inclusive.
> 
> It naturally allows negative values. Now it won't even limit on the
> size, as long as double would allow.
> 
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  util/cutils.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Since you just introduced this in 2/4, I'd rather see the two squashed
together if we decide this is the interface we want to support.


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-05-11 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 12:22 [Qemu-devel] [PATCH v7 0/4] ramblock: add hmp command "info ramblock" Peter Xu
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 1/4] ramblock: add RAMBLOCK_FOREACH() Peter Xu
2017-05-11 13:01   ` Dr. David Alan Gilbert
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 2/4] utils: provide size_to_str() Peter Xu
2017-05-11 13:05   ` Dr. David Alan Gilbert
2017-05-12  4:12     ` Peter Xu
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 3/4] ramblock: add new hmp command "info ramblock" Peter Xu
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 4/4] utils: remove assert in size_to_str() Peter Xu
2017-05-11 15:03   ` Eric Blake [this message]
2017-05-11 18:22     ` Markus Armbruster
2017-05-11 18:26       ` Eric Blake

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=d938d532-6d11-0ec5-a24a-0a44519bc021@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).