[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: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH 6/8] smbus: Fix unreachable code in smb_transaction() |
Date: |
Wed, 28 May 2014 12:12:54 +0000 |
> -----Original Message-----
> From: Paolo Bonzini [mailto:address@hidden On Behalf Of Paolo
> Bonzini
> Sent: Wednesday, May 28, 2014 4:01 PM
> To: Gonglei (Arei); address@hidden
> Cc: address@hidden; address@hidden; Huangweidong (C);
> address@hidden; address@hidden; Luonengjun; address@hidden;
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden
> Subject: Re: [PATCH 6/8] smbus: Fix unreachable code in smb_transaction()
>
> 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.
>
I see. Thanks!
Best regards,
-Gonglei
- Re: [Qemu-devel] [PATCH 7/8] dump: Fix use-after-free in create_kdump_vmcore(), (continued)
- [Qemu-devel] [PATCH 3/8] json-parser: fix two coverity defects, arei.gonglei, 2014/05/26
- [Qemu-devel] [PATCH 6/8] smbus: Fix unreachable code in smb_transaction(), arei.gonglei, 2014/05/26
- [Qemu-devel] [PATCH 1/8] vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16, 24, 32}, arei.gonglei, 2014/05/26
- Re: [Qemu-devel] [PATCH 1/8] vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16, 24, 32}, Paolo Bonzini, 2014/05/27
- Re: [Qemu-devel] [PATCH 1/8] vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16, 24, 32}, Gonglei (Arei), 2014/05/28
- Re: [Qemu-devel] [PATCH 1/8] vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16, 24, 32}, Paolo Bonzini, 2014/05/28
- Re: [Qemu-devel] [PATCH 1/8] vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16, 24, 32}, Gonglei (Arei), 2014/05/28
- [Qemu-devel] [PATCH 8/8] audio: Fix using freed pointer in wav_fini_out(), arei.gonglei, 2014/05/26
- [Qemu-devel] [PATCH 4/8] qcow2-cluster: Fix memory leak in copy_sectors, arei.gonglei, 2014/05/26