]> granicus.if.org Git - esp-idf/commitdiff
bt/a2dp: fix incorrect return type
authorIvan Grokhotkov <ivan@espressif.com>
Tue, 28 Aug 2018 09:31:18 +0000 (17:31 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 29 Aug 2018 06:40:28 +0000 (14:40 +0800)
res was declared as “bool” so expression

((count == 0) ? A2D_SET_ONE_BIT : A2D_SET_MULTL_BIT)

always evaluated to “true”, and was implicitly converted to
A2D_SET_ONE_BIT.

components/bt/bluedroid/stack/a2dp/a2d_api.c

index 73b174e6147cc02d78824a10a1e7e3d1061e77c0..937e46b1e1df490383f453350c9e7b9cc4d73ea6 100644 (file)
@@ -352,8 +352,8 @@ UINT8 A2D_SetTraceLevel (UINT8 new_level)
 ******************************************************************************/
 UINT8 A2D_BitsSet(UINT8 num)
 {
-    UINT8   count;
-    BOOLEAN res;
+    UINT8 count;
+    UINT8 res;
     if (num == 0) {
         res = A2D_SET_ZERO_BIT;
     } else {