Skip to contentSkip to conversation

audio: fix missing break

PATCH In review Paolo Bonzini 2 participants 2 messages Oct 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audio: fix missing break

Reported by Coverity (CID 1406449).

---
 audio/paaudio.c | 1 +
 1 file changed, 1 insertion(+)
audio/paaudio.c +1 -0
index df541a72d3..55a91f8980 100644
@@ -385,6 +385,7 @@ static pa_stream *qpa_simple_new (
         map.map[5] = PA_CHANNEL_POSITION_REAR_RIGHT;
         map.map[6] = PA_CHANNEL_POSITION_SIDE_LEFT;
         map.map[7] = PA_CHANNEL_POSITION_SIDE_RIGHT;
+        break;
 
     default:
         dolog("Internal error: unsupported channel count %d\n", ss->channels);
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Paolo Bonzini

Reported by Coverity (CID 1406449).

Gerd sent the same patch earlier:
https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg05923.html

But your description is better.

Quoted 19 lines
---
  audio/paaudio.c | 1 +
  1 file changed, 1 insertion(+)
audio/paaudio.c +1 -0
index df541a72d3..55a91f8980 100644
@@ -385,6 +385,7 @@ static pa_stream *qpa_simple_new (
          map.map[5] = PA_CHANNEL_POSITION_REAR_RIGHT;
          map.map[6] = PA_CHANNEL_POSITION_SIDE_LEFT;
          map.map[7] = PA_CHANNEL_POSITION_SIDE_RIGHT;
+        break;
 
      default:
          dolog("Internal error: unsupported channel count %d\n", ss->channels);