summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-03-01 11:58:26 -0800
committerMarcel Holtmann <marcel@holtmann.org>2014-03-01 11:58:26 -0800
commit3ae058459b250e91d0bbc9b758bdd9965ed963b3 (patch)
tree9c8b6ec4b88f4cbf808f20154906134b0d077d8c /profiles
parent0fad8a94a1b5c0ff01f0ea47e8ec3e5bbb7229e3 (diff)
downloadbluez-3ae058459b250e91d0bbc9b758bdd9965ed963b3.tar.gz
audio: Update code for set_company_id function
Diffstat (limited to 'profiles')
-rw-r--r--profiles/audio/avrcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index d9444860b..4c5ab6136 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)