* [PATCH] efi_loader: simplify logical expression in efi_disk_add_dev()
@ 2020-03-19 14:48 Heinrich Schuchardt
0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2020-03-19 14:48 UTC (permalink / raw)
To: u-boot
To check if a variable is non-zero there is no need for '!= 0'.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
lib/efi_loader/efi_disk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 9563556691..fc0682bc48 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -367,7 +367,7 @@ static efi_status_t efi_disk_add_dev(
diskobj->media.block_size = desc->blksz;
diskobj->media.io_align = desc->blksz;
diskobj->media.last_block = desc->lba - offset;
- if (part != 0)
+ if (part)
diskobj->media.logical_partition = 1;
diskobj->ops.media = &diskobj->media;
if (disk)
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-19 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 14:48 [PATCH] efi_loader: simplify logical expression in efi_disk_add_dev() Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.