[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [RESEND PATCH 1/3] socket: remove redund
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [RESEND PATCH 1/3] socket: remove redundant check |
Date: |
Wed, 01 Aug 2012 13:50:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Peter Maydell <address@hidden> writes:
> On 1 August 2012 11:50, Stefan Hajnoczi <address@hidden> wrote:
>> This isn't obvious. It looks like the intent of the if (!e->ai_next) is
>> to suppress the error so that the next iteration of the *outer* loop can
>> succeed.
>
> Yeah, we only call it an error on the last time round. This
> loop is a bit confusingly structured, since we're effectively
> handling the failure in several places at once: we always
> fprintf() something, then we set the error on the last time
> round the loop, then at the end of the loop we fprintf again.
> We also duplicate the loop termination condition.
I cleaned it up some back in February, but my admittedly incremental
improvement was rejected because it didn't also convert to error_set().
*shrug*
http://lists.nongnu.org/archive/html/qemu-devel/2012-02/msg00772.html
[...]
Message not available
Message not available