|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 6/8] smbus: Fix unreachable code in smb_transaction() |
Date: | Wed, 28 May 2014 10:00:32 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Il 28/05/2014 02:59, Gonglei (Arei) ha scritto:
> > - abort();> > This is intentional defensive programming. A "break" from the switch > would be wrong, hence the "abort" here. >But the "break" is unreachable at all case conditions. All those cases will goto data8/data16/done/error.
Of course, otherwise we'd have a bug. The abort() ensures that this remains the case in the future as well.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |