qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] block migration: fix return value mismatch


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH 1/1] block migration: fix return value mismatch
Date: Mon, 24 Nov 2014 09:10:20 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

* Gary R Hook (address@hidden) wrote:
> Stefan Hajnoczi <address@hidden> writes:
> 
> > On Wed, Nov 12, 2014 at 06:48:18PM +0000, Gary Hook wrote:
> >> -    return qemu_ftell(f) - last_ftell;
> >> +    delta_ftell = qemu_ftell(f) - last_ftell;
> >> +    return( (delta_ftell > 0) ? 1 : (delta_ftell < 0) ? -1 : 0 );
> >
> > Good find!
> >
> > Please don't nest the ternary operator, it is hard to read.
> >
> > if (delta_ftell < 0) {
> >     return -1;
> > } else if (delta_ftell > 0) {
> >     return 1;
> > } else {
> >     return 0;
> > }
> 
> So now that it's clear that I fully botched the patch submission, I would
> like to follow up: shall I resubmit this change?
> 
> I don't see this fix in the current source (which makes sense due to the 2.2
> RC2 work) but folks are asking. And it appears that there's a bug report
> over at RedHat that may be the same problem.
> 
> I think I'll add to my .sig: "Look, ma, only 72 columns!"

Please resubmit it, especially with the correct Signed-off-by

Dave

> 
> -- 
> Gary R Hook
> Senior Kernel Engineer
> NIMBOXX, Inc
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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