From patchwork Thu Mar 19 14:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 243933 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Thu, 19 Mar 2020 15:48:15 +0100 Subject: [PATCH] efi_loader: simplify logical expression in efi_disk_add_dev() Message-ID: <20200319144816.42700-1-xypron.glpk@gmx.de> To check if a variable is non-zero there is no need for '!= 0'. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 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)