Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 597095f0 authored by Chris Manton's avatar Chris Manton
Browse files

Enum-ify tBTA_STATUS

Toward readable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: Id79e619d24484ace55409e32f99368d5d9bce06e
parent cf2cc848
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1214,7 +1214,7 @@ void bta_dm_sdp_result(tBTA_DM_MSG* p_data) {
      // Piggy back the SCN over result field
      if (scn_found) {
        p_msg->disc_result.result.disc_res.result =
            (3 + bta_dm_search_cb.peer_scn);
            static_cast<tBTA_STATUS>((3 + bta_dm_search_cb.peer_scn));
        p_msg->disc_result.result.disc_res.services |= BTA_USER_SERVICE_MASK;

        APPL_TRACE_EVENT(" Piggy back the SCN over result field  SCN=%d",
+8 −8
Original line number Diff line number Diff line
@@ -46,14 +46,14 @@
 ****************************************************************************/

/* Status Return Value */
#define BTA_SUCCESS 0 /* Successful operation. */
#define BTA_FAILURE 1 /* Generic failure. */
#define BTA_PENDING 2 /* API cannot be completed right now */
#define BTA_BUSY 3
#define BTA_NO_RESOURCES 4
#define BTA_WRONG_MODE 5

typedef uint8_t tBTA_STATUS;
typedef enum : uint8_t {
  BTA_SUCCESS = 0, /* Successful operation. */
  BTA_FAILURE = 1, /* Generic failure. */
  BTA_PENDING = 2, /* API cannot be completed right now */
  BTA_BUSY = 3,
  BTA_NO_RESOURCES = 4,
  BTA_WRONG_MODE = 5,
} tBTA_STATUS;

/*
 * Service ID