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

Commit bdbe9e8b authored by Chris Manton's avatar Chris Manton
Browse files

stack::rfcomm::PORT_IsOpening Remove unnecessary boolean check

Bug: 346590424
Test: m .
Flag: EXEMPT, Mechanical Refactor
Change-Id: Id313920bfb7e7b7ac061e6ff29e1af1a103cfb36
parent 7a54912a
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -505,21 +505,19 @@ bool PORT_IsOpening(RawAddress* bd_addr) {
    }

    if (multiplexer_cb.state == RFC_MX_STATE_CONNECTED) {
      bool found_port = false;
      tPORT* p_port = nullptr;

      for (tPORT& port : rfc_cb.port.port) {
        if (port.rfc.p_mcb == &multiplexer_cb) {
          found_port = true;
          p_port = &port;
          break;
        }
      }

      log::info("RFC_MX_STATE_CONNECTED, found_port={}, tRFC_PORT_STATE={}",
                found_port, p_port != nullptr ? p_port->rfc.state : 0);
      if ((!found_port) ||
          (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) {
                (p_port != nullptr) ? "T" : "F",
                (p_port != nullptr) ? p_port->rfc.state : 0);
      if ((p_port == nullptr) || (p_port->rfc.state < RFC_STATE_OPENED)) {
        /* Port is not established yet. */
        *bd_addr = multiplexer_cb.bd_addr;
        log::info(