From c8d967417c50728a7ed9e77f903d062457cc0702 Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Wed, 5 Jun 2019 14:43:23 +0800 Subject: [PATCH] bootloader: remove duplicate region overlap logic (MINOR CHANGE) --- components/bootloader_support/include/bootloader_util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/bootloader_support/include/bootloader_util.h b/components/bootloader_support/include/bootloader_util.h index 30f8bd8d2..500498d39 100644 --- a/components/bootloader_support/include/bootloader_util.h +++ b/components/bootloader_support/include/bootloader_util.h @@ -29,6 +29,7 @@ static inline bool bootloader_util_regions_overlap( const intptr_t start1, const intptr_t end1, const intptr_t start2, const intptr_t end2) { - return (end1 > start2 && end2 > start1) || - !(end1 <= start2 || end2 <= start1); + assert(end1>start1); + assert(end2>start2); + return (end1 > start2 && end2 > start1); }