From ce2f04459ebf14a6c702bf1657bdcbfe93f1a0aa Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Mon, 7 Sep 2020 12:43:08 -0700 Subject: [PATCH] Straighten out tBTM_BOND_TYPE Towards readable code Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: I7e230c8c5a621d54c10cb80b92193a941f731a1a --- stack/btm/security_device_record.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stack/btm/security_device_record.h b/stack/btm/security_device_record.h index d703ca58c..35f364da3 100644 --- a/stack/btm/security_device_record.h +++ b/stack/btm/security_device_record.h @@ -202,8 +202,11 @@ typedef struct { } tBTM_SEC_BLE; /* Peering bond type */ -enum { BOND_TYPE_UNKNOWN, BOND_TYPE_PERSISTENT, BOND_TYPE_TEMPORARY }; -typedef uint8_t tBTM_BOND_TYPE; +typedef enum : uint8_t { + BOND_TYPE_UNKNOWN = 0, + BOND_TYPE_PERSISTENT = 1, + BOND_TYPE_TEMPORARY = 2 +} tBTM_BOND_TYPE; /* * Define structure for Security Device Record. -- 2.11.0