OSDN Git Service

Simpify boolean expression
authorZach Johnson <zachoverflow@google.com>
Wed, 19 Aug 2020 21:22:07 +0000 (14:22 -0700)
committerZach Johnson <zachoverflow@google.com>
Thu, 20 Aug 2020 07:21:59 +0000 (00:21 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic8717d02f73c5fc0ca2f6f7be4173b1574613490

stack/btm/btm_sec.cc

index 8670027..885a36a 100644 (file)
@@ -4651,9 +4651,7 @@ tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec) {
 
   /* If connection is not authorized and authorization is required */
   /* start authorization and return PENDING to the caller */
-  if (!(p_dev_rec->sec_flags & BTM_SEC_AUTHORIZED) &&
-      ((p_dev_rec->is_originator && false) ||
-       (!p_dev_rec->is_originator && false))) {
+  if (!(p_dev_rec->sec_flags & BTM_SEC_AUTHORIZED) && (false || false)) {
     BTM_TRACE_EVENT(
         "service id:%d, is trusted:%d", p_dev_rec->p_cur_service->service_id,
         (BTM_SEC_IS_SERVICE_TRUSTED(p_dev_rec->trusted_mask,