qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: li guang <lig.fnst@cn.fujitsu.com>
Cc: kwolf@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [ [PATCH 1/2] cutils:change strtosz_suffix_unit function
Date: Wed, 12 Dec 2012 09:18:44 +0100	[thread overview]
Message-ID: <20121212081844.GA14695@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1355273897.4650.16.camel@liguang.fnst.cn.fujitsu.com>

On Wed, Dec 12, 2012 at 08:58:17AM +0800, li guang wrote:
> 在 2012-12-11二的 10:52 +0100,Stefan Hajnoczi写道:
> > On Fri, Dec 07, 2012 at 11:49:49AM +0800, liguang wrote:
> > > if value to be translated is larger than INT64_MAX,
> > > this function will not be convenient for caller to
> > > be aware of it, so change a little for this.
> > > 
> > > Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
> > > ---
> > >  cutils.c |    5 +++--
> > >  1 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > I don't understand what this patch is supposed to do.
> 
> little change to let the caller know the translated value overflow

Using a negative errno will make the intent clear.

> > 
> > Why change the type of mul from double to int64_t?
> 
> mul is multiplier generated by suffix_mul(return value type int64_t)
> so double is incorrect.

Okay, thanks.  I asked because I wondered whether it had something to do
with overflow detection.  Please put unrelated changes in separate
patches - and if you feel it's not worth putting in a separate patch
then maybe it's not worth changing at all.

Stefan

  reply	other threads:[~2012-12-12  8:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07  3:49 [Qemu-devel] [ [PATCH 1/2] cutils:change strtosz_suffix_unit function liguang
2012-12-07  3:49 ` [Qemu-devel] [ [PATCH 2/2] qemu-img:report size overflow error message liguang
2012-12-11 15:11   ` Markus Armbruster
2012-12-12  0:59     ` li guang
2012-12-11  9:52 ` [Qemu-devel] [ [PATCH 1/2] cutils:change strtosz_suffix_unit function Stefan Hajnoczi
2012-12-11 15:06   ` Markus Armbruster
2012-12-12  0:58   ` li guang
2012-12-12  8:18     ` Stefan Hajnoczi [this message]
2012-12-12 10:12 ` Igor Mammedov
2012-12-13  8:03   ` Markus Armbruster
2012-12-13  9:11     ` Igor Mammedov
2012-12-13 12:09       ` Markus Armbruster
  -- strict thread matches above, loose matches on Subject: below --
2012-12-14  4:08 [Qemu-devel] " liguang
2012-12-14 12:09 ` Markus Armbruster
2012-12-14 13:45   ` Igor Mammedov
2012-12-17  1:09     ` li guang
2012-12-17  0:35   ` li guang

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=20121212081844.GA14695@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lig.fnst@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).