MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028
Non-Boolean comparisons should use a compare operator
(==, !=, >, < >=, <=).
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
---
MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
index 382efa9aa0..b161d1a981 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
@@ -742,11 +742,11 @@ IsCapsuleOnDiskSupported (
);
if (EFI_ERROR (Status)) {
return FALSE;
}
- if (OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) {
+ if ((OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) != 0) {
return TRUE;
}
return FALSE;
}
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#45523): https://edk2.groups.io/g/devel/message/45523
Mute This Topic: https://groups.io/mt/32851273/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Xu, Wei6
> Sent: Tuesday, August 13, 2019 6:53 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028
>
> Non-Boolean comparisons should use a compare operator
> (==, !=, >, < >=, <=).
>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
> ---
> MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> index 382efa9aa0..b161d1a981 100644
> --- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> @@ -742,11 +742,11 @@ IsCapsuleOnDiskSupported (
> );
> if (EFI_ERROR (Status)) {
> return FALSE;
> }
>
> - if (OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) {
> + if ((OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) != 0) {
> return TRUE;
> }
>
> return FALSE;
> }
> --
> 2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#45642): https://edk2.groups.io/g/devel/message/45642
Mute This Topic: https://groups.io/mt/32851273/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
> -----Original Message-----
> From: Xu, Wei6
> Sent: Tuesday, August 13, 2019 6:53 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A; Gao, Liming
> Subject: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve
> comparisons in CapsuleOnDisk.c
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028
>
> Non-Boolean comparisons should use a compare operator
> (==, !=, >, < >=, <=).
>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
> ---
> MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> index 382efa9aa0..b161d1a981 100644
> --- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
> @@ -742,11 +742,11 @@ IsCapsuleOnDiskSupported (
> );
> if (EFI_ERROR (Status)) {
> return FALSE;
> }
>
> - if (OsIndicationsSupported &
> EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) {
> + if ((OsIndicationsSupported &
> EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) != 0) {
> return TRUE;
> }
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Pushed via commit 34651e7d76.
Best Regards,
Hao Wu
>
> return FALSE;
> }
> --
> 2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#45646): https://edk2.groups.io/g/devel/message/45646
Mute This Topic: https://groups.io/mt/32851273/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.