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.f...@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