From fca6a2fd68ade78a82ebd96b9bad2410086bb3e2 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Tue, 15 Dec 2020 16:44:24 +0530 Subject: [PATCH] bluetooth: a2dp-codec-util: Use lower index for higher priority Instead of letting a codec with higher index have higher priority, just use a lower index for high priority. This allows the for loop iterating over the codecs to be written in a straightforward manner and not have to iterate from the end. FWIW Pipewire does the same. Part-of: --- src/modules/bluetooth/a2dp-codec-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/bluetooth/a2dp-codec-util.c b/src/modules/bluetooth/a2dp-codec-util.c index 94d01e7bd..fef709220 100644 --- a/src/modules/bluetooth/a2dp-codec-util.c +++ b/src/modules/bluetooth/a2dp-codec-util.c @@ -29,7 +29,7 @@ extern const pa_a2dp_codec pa_a2dp_codec_sbc; /* This is list of supported codecs. Their order is important. - * Codec with higher index has higher priority. */ + * Codec with lower index has higher priority. */ const pa_a2dp_codec *pa_a2dp_codecs[] = { &pa_a2dp_codec_sbc, };