Patchwork bt-host: add missing break statement

login
register
mail settings
Submitter Stefan Hajnoczi
Date Jan. 12, 2012, 2:17 p.m.
Message ID <1326377824-23776-1-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/135634/
State New
Headers show

Comments

Stefan Hajnoczi - Jan. 12, 2012, 2:17 p.m.
The switch statement in bt_host_read() is missing a break in one case.
Andrzej Zaborowski <andrew.zaborowski@intel.com> confirmed that this is
not an intentional fall-through.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 bt-host.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Stefan Weil - Jan. 12, 2012, 5:44 p.m.
Am 12.01.2012 15:17, schrieb Stefan Hajnoczi:
> The switch statement in bt_host_read() is missing a break in one case.
> Andrzej Zaborowski <andrew.zaborowski@intel.com> confirmed that this is
> not an intentional fall-through.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
> bt-host.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/bt-host.c b/bt-host.c
> index df5b7cd..0d3ad28 100644
> --- a/bt-host.c
> +++ b/bt-host.c
> @@ -130,6 +130,7 @@ static void bt_host_read(void *opaque)
> pktlen = MIN(pkt[2] + 3, s->len);
> s->len -= pktlen;
> pkt += pktlen;
> + break;
>
> default:
> bad_pkt:

Reviewed-by: Stefan Weil <sw@weilnetz.de>

Patch

diff --git a/bt-host.c b/bt-host.c
index df5b7cd..0d3ad28 100644
--- a/bt-host.c
+++ b/bt-host.c
@@ -130,6 +130,7 @@  static void bt_host_read(void *opaque)
             pktlen = MIN(pkt[2] + 3, s->len);
             s->len -= pktlen;
             pkt += pktlen;
+            break;
 
         default:
         bad_pkt: