From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0724.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe44::724]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6A2388198B for ; Fri, 6 Jan 2017 01:04:22 -0800 (PST) Received: from CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.26) by CS1PR84MB0294.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Fri, 6 Jan 2017 09:04:20 +0000 Received: from CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.26]) by CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.26]) with mapi id 15.01.0817.013; Fri, 6 Jan 2017 09:04:20 +0000 From: "Wang, Sunny (HPS SW)" To: Hao Wu , "edk2-devel@lists.01.org" CC: Ruiyu Ni , "Wang, Sunny (HPS SW)" Thread-Topic: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Remove redundant type cast Thread-Index: AQHSZ/pbQuPhNoJDxkOWDM5eGeOkg6ErJ1wQ Date: Fri, 6 Jan 2017 09:04:20 +0000 Message-ID: References: <1483692781-24460-1-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1483692781-24460-1-git-send-email-hao.a.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sunnywang@hpe.com; x-originating-ip: [15.211.131.5] x-microsoft-exchange-diagnostics: 1; CS1PR84MB0294; 7:8ZWH5u57fP2RDIpVJ/0p+gxXrBMoaArQExKByXC9uJHVipGgaTp7OzBKNVzwQXP038G4M/2R9sSHm2RiRGS2/wGKu0QgrQIYMe2d6Ayd4VEz5pUNK1f7dpyYp4sr5mKvfDvMi6zA40vwxHZziLZYhwGIPGTmluaU4wdtYim1Y+FyBa9kXJn1nvmnw9laz4Wl0+JW4cTby0gm/7R0I3gJxXVtPe461Ihzcnq8R+Irsib0OyuPTi426xqsslu6NAyKW2GHi/W92hx3COG/rX9awxYCspz6BwXnUCzC33/HTkDOPVruAxph+XEhNW5Cp5srGKkJ1nBTNGtTCksZudbziAXicR4a40hPJrzjvl1DqpxDKP9KjgvDednEm8yTHeBY7hp/dFKDI+cl68h+TH/FCo8WH679B/L1tlved9xSTRZlcCrVSNMj4PiOMG6PQckbT6VhwicPW3SxTSnwXVHqSA== x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39850400002)(39410400002)(39860400002)(39450400003)(39840400002)(189002)(199003)(377454003)(13464003)(9686002)(92566002)(66066001)(7736002)(305945005)(2501003)(3280700002)(105586002)(189998001)(122556002)(106116001)(68736007)(97736004)(8936002)(106356001)(101416001)(86362001)(2900100001)(5001770100001)(81156014)(6116002)(3846002)(102836003)(81166006)(8676002)(33656002)(4326007)(5660300001)(6506006)(7696004)(6306002)(77096006)(6436002)(74316002)(3660700001)(55016002)(2906002)(2950100002)(38730400001)(54906002)(229853002)(76176999)(54356999)(50986999); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0294; H:CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 23f97229-0109-46bc-4437-08d436130068 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CS1PR84MB0294; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:CS1PR84MB0294; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0294; x-forefront-prvs: 01792087B6 received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2017 09:04:20.3182 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0294 Subject: Re: [PATCH] MdeModulePkg/UefiBootManagerLib: Remove redundant type cast X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 09:04:22 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me.=20 Reviewed-by: Sunny Wang -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Hao = Wu Sent: Friday, January 06, 2017 4:53 PM To: edk2-devel@lists.01.org Cc: Hao Wu ; Ruiyu Ni Subject: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: Remove redundant t= ype cast The type of return value for function EfiBootManagerFindLoadOption() is INT= N. When checking its return value, it is unnecessary to type cast -1 to typ= e UINTN. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index 6b84b85..75bd5dc 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1,7 +1,7 @@ /** @file Library functions which relates with booting. =20 -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
Thi= s program and the accompanying materials are licensed and made available u= nder the terms and conditions of the BSD License @@ -2152,7 +2152,7 @@ EfiB= ootManagerRefreshAllBootOption ( // Only check those added by BDS // so that the boot options added by end-user or OS installer won't = be deleted // - if (EfiBootManagerFindLoadOption (&NvBootOptions[Index], BootOptions= , BootOptionCount) =3D=3D (UINTN) -1) { + if (EfiBootManagerFindLoadOption (&NvBootOptions[Index],=20 + BootOptions, BootOptionCount) =3D=3D -1) { Status =3D EfiBootManagerDeleteLoadOptionVariable (NvBootOptions[I= ndex].OptionNumber, LoadOptionTypeBoot); // // Deleting variable with current variable implementation shouldn'= t fail. @@ -2166,7 +2166,7 @@ EfiBootManagerRefreshAllBootOption ( // Add new EFI boot options to NV // for (Index =3D 0; Index < BootOptionCount; Index++) { - if (EfiBootManagerFindLoadOption (&BootOptions[Index], NvBootOptions, = NvBootOptionCount) =3D=3D (UINTN) -1) { + if (EfiBootManagerFindLoadOption (&BootOptions[Index],=20 + NvBootOptions, NvBootOptionCount) =3D=3D -1) { EfiBootManagerAddLoadOptionVariable (&BootOptions[Index], (UINTN) -1= ); // // Try best to add the boot options so continue upon failure. -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel