Bluetooth: GATT: Remove unnecessary usage of full UUID structs

To access the 16-bit value of GATT UUIDs it's quite overkill to first
create anonymous UUID structs and then access the value member from
them. We can simplify this a lot with the help of the recently added
UUID value definitions.

Change-Id: Ib58012c20d07b3e60e5911cea6feb73301d1323c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-01-27 21:52:58 -05:00 committed by Anas Nashif
commit 44541091dc
2 changed files with 5 additions and 5 deletions

View file

@ -499,7 +499,7 @@ static uint8_t att_find_type_req(struct bt_att *att, struct net_buf *buf)
* and the Attribute Value set to the 16-bit Bluetooth UUID or 128-bit
* UUID for the specific primary service.
*/
if (type != BT_UUID_GATT_PRIMARY->u16) {
if (type != BT_UUID_GATT_PRIMARY_VAL) {
send_err_rsp(conn, BT_ATT_OP_FIND_TYPE_REQ, start_handle,
BT_ATT_ERR_ATTRIBUTE_NOT_FOUND);
return 0;