Diff between 0fad8a94a1b5c0ff01f0ea47e8ec3e5bbb7229e3 and 3ae058459b250e91d0bbc9b758bdd9965ed963b3

Changed Files

File Additions Deletions Status
profiles/audio/avrcp.c +4 -4 modified

Full Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index d944486..4c5ab61 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -490,11 +490,11 @@ static uint32_t get_company_id(const uint8_t cid[3])
  *
  * Set three-byte Company_ID into outgoing AVRCP message
  */
-static void set_company_id(uint8_t cid[3], const uint32_t cid_in)
+static void set_company_id(uint8_t cid[3], uint32_t cid_in)
 {
-	cid[0] = cid_in >> 16;
-	cid[1] = cid_in >> 8;
-	cid[2] = cid_in;
+	cid[0] = (cid_in & 0xff0000) >> 16;
+	cid[1] = (cid_in & 0x00ff00) >> 8;
+	cid[2] = (cid_in & 0x0000ff);
 }
 
 static const char *attr_to_str(uint8_t attr)