* [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c
@ 2019-08-13 10:53 Xu, Wei6
2019-08-15 0:28 ` Liming Gao
2019-08-15 1:12 ` Wu, Hao A
0 siblings, 2 replies; 3+ messages in thread
From: Xu, Wei6 @ 2019-08-13 10:53 UTC (permalink / raw)
To: devel; +Cc: Hao A Wu, Liming Gao
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c
2019-08-13 10:53 [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c Xu, Wei6
@ 2019-08-15 0:28 ` Liming Gao
2019-08-15 1:12 ` Wu, Hao A
1 sibling, 0 replies; 3+ messages in thread
From: Liming Gao @ 2019-08-15 0:28 UTC (permalink / raw)
To: Xu, Wei6, devel@edk2.groups.io; +Cc: Wu, Hao A
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c
2019-08-13 10:53 [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c Xu, Wei6
2019-08-15 0:28 ` Liming Gao
@ 2019-08-15 1:12 ` Wu, Hao A
1 sibling, 0 replies; 3+ messages in thread
From: Wu, Hao A @ 2019-08-15 1:12 UTC (permalink / raw)
To: Xu, Wei6, devel@edk2.groups.io; +Cc: Gao, Liming
> -----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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-15 1:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-13 10:53 [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c Xu, Wei6
2019-08-15 0:28 ` Liming Gao
2019-08-15 1:12 ` Wu, Hao A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox