From 3ae058459b250e91d0bbc9b758bdd9965ed963b3 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 1 Mar 2014 11:58:26 -0800 Subject: [PATCH] audio: Update code for set_company_id function --- profiles/audio/avrcp.c | 8 ++++---- 1 file 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) -- 2.47.3