From c76818f11c0ffe6ca5d1053d4a330621d333ff8a Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 22 Sep 2006 16:45:33 +0900 Subject: kexec-tools: Slightly less nested logic in patch_efi_memmap() This makes the tail of patch_efi_memmap() slightly less nested, and thus a little easier to read. Signed-Off-By: Simon Horman --- purgatory/arch/ia64/purgatory-ia64.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/purgatory/arch/ia64/purgatory-ia64.c b/purgatory/arch/ia64/purgatory-ia64.c index 8588e9b..6e06ca2 100644 --- a/purgatory/arch/ia64/purgatory-ia64.c +++ b/purgatory/arch/ia64/purgatory-ia64.c @@ -199,16 +199,15 @@ patch_efi_memmap(struct kexec_boot_params *params, dst_md->num_pages = mid_pages; dst_md->type = seg->reserved ? EFI_UNUSABLE_MEMORY:EFI_LOADER_DATA; - if (end_pages) { - dest += boot_param->efi_memdesc_size; - dst_md = dest; - *dst_md = *src_md; - dst_md->phys_addr = seg->end; - dst_md->num_pages = end_pages; - dst_md->type = orig_type; - mstart = seg->end; - } else + if (!end_pages) break; + dest += boot_param->efi_memdesc_size; + dst_md = dest; + *dst_md = *src_md; + dst_md->phys_addr = seg->end; + dst_md->num_pages = end_pages; + dst_md->type = orig_type; + mstart = seg->end; } } -- cgit