OSDN Git Service

Straighten out tBTM_BOND_TYPE
authorChris Manton <cmanton@google.com>
Mon, 7 Sep 2020 19:43:08 +0000 (12:43 -0700)
committerChris Manton <cmanton@google.com>
Wed, 9 Sep 2020 22:36:54 +0000 (22:36 +0000)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7e230c8c5a621d54c10cb80b92193a941f731a1a

stack/btm/security_device_record.h

index d703ca5..35f364d 100644 (file)
@@ -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.