Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1142409ybi; Fri, 12 Jul 2019 10:25:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvlw1F+R60hkKw4PeMIQnOabdn5GikJSW2y81JzvZrxx2qLPYiJr/iXMvlt8wpBvrpjjvR X-Received: by 2002:a63:4522:: with SMTP id s34mr11981812pga.362.1562952351729; Fri, 12 Jul 2019 10:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562952351; cv=none; d=google.com; s=arc-20160816; b=g4xJAb5yYX7gqyWzCOeBvVXbDWWsExRmKGjjq2f0SV6wnpwfg4uToOiqlvaOprrF03 hns2tMd7YKUEdTRLPXJBh+hHxceplijWD0UrNFjThiZ6Id5phNrokEBJ37+1hqHHLRvE 4oAJd7CxrSB6w84+Bd4il+6qog5+9fxYLVCXV53BYeKYwtnxArs1Mq69IHXamCTohujD P3+cbFeY0pkcmIUN99o/fi7dgnuUSv9VmMFmL8wr/KiGgMNg3FhRCf+BNlHuqfhuvoSq noG9NocmlGBZTlkjEoLSdAVI8oRER+rObsCRRYmRKJExX0UwabwVneFW3p96iibr2Ums 7w3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=Pju7VwCl3prPs/c5HG+/+Bijm8n2oe1tgKFWp/dluS0=; b=VQo01u3s3xDj7Jwc+V9TvU6WQOVAgihuQkjso1oFJRKgknayqJpTjZ19WvWTsksBTN BPPUtpxCTkoS5lmIlcsS7D087BVZ2cLDl24G8QG0WQ9DLi4VAueeagiXhOrGT1RIhZd3 oqlVXGT13jkgi/1mKJlo6TT9th/asoxkhxv+d+TgDDDgBf8Z0ZSRTfJjYdwyY0vgYicN KC10aHxdh2PnZhI7VYH3JwlCOnB88l5XLt3ly2ZCrixJVI2zBYlCSNfIzhNvU+caUsoa 2DZNx1lDOwFbpQSvXk25M/6nA6pJ7GzLH5u9JDEoYhRfYjRQ7bUwV1tpOBtOvQlGN9C7 jidQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o30si8836136pgl.575.2019.07.12.10.25.20; Fri, 12 Jul 2019 10:25:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726449AbfGLRZT (ORCPT + 99 others); Fri, 12 Jul 2019 13:25:19 -0400 Received: from mga03.intel.com ([134.134.136.65]:4976 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726976AbfGLRZT (ORCPT ); Fri, 12 Jul 2019 13:25:19 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2019 10:25:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,483,1557212400"; d="p7s'?scan'208";a="166732450" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga008.fm.intel.com with ESMTP; 12 Jul 2019 10:25:18 -0700 Received: from orsmsx126.amr.corp.intel.com (10.22.240.126) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 12 Jul 2019 10:25:17 -0700 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.44]) by ORSMSX126.amr.corp.intel.com ([169.254.4.77]) with mapi id 14.03.0439.000; Fri, 12 Jul 2019 10:25:17 -0700 From: "Gix, Brian" To: "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" CC: "luiz.dentz@gmail.com" , "johan.hedberg@gmail.com" Subject: Re: [PATCH BlueZ] emulator: Fix condition check in btdev_create() Thread-Topic: [PATCH BlueZ] emulator: Fix condition check in btdev_create() Thread-Index: AQHVMjZP1PNno1uJN0Os50PXWr8CXabHvnWA Date: Fri, 12 Jul 2019 17:25:17 +0000 Message-ID: <6d4bf5321409c4d348dd653dce82bda31eff2bcc.camel@intel.com> References: <20190704070110.13815-1-inga.stotland@intel.com> In-Reply-To: <20190704070110.13815-1-inga.stotland@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.254.34.100] Content-Type: multipart/signed; micalg=sha-1; protocol="application/x-pkcs7-signature"; boundary="=-ruL3LuIaqHuDkOoy9B3G" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --=-ruL3LuIaqHuDkOoy9B3G Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Applied. On Thu, 2019-07-04 at 00:01 -0700, Inga Stotland wrote: > This fixes a case where logical '||' was used with constant operand > and the condition check always resulted in true. >=20 > Was: if (type =3D=3D BTDEV_TYPE_BREDRLE || type =3D=3D BTDEV_TYPE_LE > || BTDEV_TYPE_BREDRLE50) > Fixed: if (type =3D=3D BTDEV_TYPE_BREDRLE || type =3D=3D BTDEV_TYPE_LE > || type =3D=3D > BTDEV_TYPE_BREDRLE50) > --- > emulator/btdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/emulator/btdev.c b/emulator/btdev.c > index f4c79c2d0..38d5b3b1f 100644 > --- a/emulator/btdev.c > +++ b/emulator/btdev.c > @@ -645,7 +645,7 @@ struct btdev *btdev_create(enum btdev_type type, > uint16_t id) > memset(btdev, 0, sizeof(*btdev)); > =20 > if (type =3D=3D BTDEV_TYPE_BREDRLE || type =3D=3D BTDEV_TYPE_LE > - || BTDEV_TYPE_BREDRLE50) { > + || type =3D=3D BTDEV_TYPE_BREDRLE50) { > btdev->crypto =3D bt_crypto_new(); > if (!btdev->crypto) { > free(btdev); --=-ruL3LuIaqHuDkOoy9B3G Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKXTCCBOsw ggPToAMCAQICEFLpAsoR6ESdlGU4L6MaMLswDQYJKoZIhvcNAQEFBQAwbzELMAkGA1UEBhMCU0Ux FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5hbCBUVFAgTmV0 d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9vdDAeFw0xMzAzMTkwMDAwMDBa Fw0yMDA1MzAxMDQ4MzhaMHkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEUMBIGA1UEBxMLU2Fu dGEgQ2xhcmExGjAYBgNVBAoTEUludGVsIENvcnBvcmF0aW9uMSswKQYDVQQDEyJJbnRlbCBFeHRl cm5hbCBCYXNpYyBJc3N1aW5nIENBIDRBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 4LDMgJ3YSVX6A9sE+jjH3b+F3Xa86z3LLKu/6WvjIdvUbxnoz2qnvl9UKQI3sE1zURQxrfgvtP0b Pg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