[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 6/8] smbus: Fix unreachable code in smb_transact

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 6/8] smbus: Fix unreachable code in smb_transaction()
Date: Wed, 28 May 2014 15:13:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 28/05/2014 14:59, Eric Blake ha scritto:
Given the questions that have been raised on this being dead code, would
it be worth just getting rid of the 'default' label, as in:

switch () {
    existing normal cases
goto error;

so that you are trading the abort() with an unconditional goto that gets
reached via the fact that the switch no longer has a default?

This wouldn't remove the fact that from the "normal cases" it makes no sense to break and go to error---which is what the abort() wants to say.


reply via email to

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