Skip to contentSkip to conversation

bt-host: add missing break statement

PATCH In review Stefan Hajnoczi 2 participants 2 messages Jan 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bt-host: add missing break statement

The switch statement in bt_host_read() is missing a break in one case. Andrzej Zaborowski <[email protected]> confirmed that this is not an intentional fall-through.

---
 bt-host.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
bt-host.c +1 -0
index df5b7cd..0d3ad28 100644
@@ -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:
Signature · 1 line
1.7.7.3
Reviewed-by on v1 1/1
#1 lore raw

Am 12.01.2012 15:17, schrieb Stefan Hajnoczi:

Quoted 19 lines

The switch statement in bt_host_read() is missing a break in one case. Andrzej Zaborowski <[email protected]> confirmed that this is not an intentional fall-through.

---
bt-host.c | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)
bt-host.c +1 -0
index df5b7cd..0d3ad28 100644
@@ -130,6 +130,7 @@ static void bt_host_read(void *opaque)
 pktlen = MIN(pkt[2] + 3, s->len);
 s->len -= pktlen;
 pkt += pktlen;
+ break;
 
Quoted 2 lines

default:
bad_pkt: